|
|
|
|
|
by hadcomplained
2291 days ago
|
|
IMHO what is essential as a language feature for writing interpreters/compilers is algebraic data types and pattern matching on them, because they make things much easier when manipulating ASTs, which is a frequent task in implementing these programs. Unfortunately besides functional programming languages (Haskell, OCaml, etc) or modern languages (such as Rust), there are few having these features, and JavaScript is no exception. Of course you can use a poor man's substitute such as the Visitor pattern, but it's quite a hassle without a direct language support. |
|