source-academy / js-slang

Implementations of sublanguages of JavaScript, TypeScript, Scheme and Python
https://source-academy.github.io/source/
Apache License 2.0
64 stars 102 forks source link

Remove src/interpreter/interpreter.ts #1476

Open martin-henz opened 10 months ago

martin-henz commented 10 months ago

I think src/ec-evaluator is replacing src/interpreter/interpreter.ts, so the latter is dead code.

Background: The interpreter used to be the workhorse implementation in SA, prior to the transpiler. After the transpiler was introduced, it became the implementation behind the environment visualizer. Now the environment visualizer uses ec-evaluator, which means that the interpreter is unemployed.

I suggest we should remove src/interpreter/interpreter.ts from js-slang, and leave some breadcrumbs in the wiki. It is bound to decay over time and cause extra work.

See also https://github.com/source-academy/js-slang/issues/1695

RichDom2185 commented 5 months ago

I think we should proceed with the removal. The only references to src/interpreter/interpreter.ts are as follows:

How are would it be to completely remove it?

martin-henz commented 5 months ago

I think we should completely remove it. It's a confusing legacy component at this point. Where are these "mocks" used?

RichDom2185 commented 5 months ago

I think we should completely remove it. It's a confusing legacy component at this point. Where are these "mocks" used?

The mocks in the last bullet point are used in test files. I'll make a PR with the necessary changes.