KeliLanguage / compiler

The compiler for Keli
https://keli-language.gitbook.io/doc/specification/
Apache License 2.0
171 stars 1 forks source link

implement array literal as linked list #47

Closed wongjiahau closed 5 years ago

wongjiahau commented 5 years ago

This is actually a trade-off decision. There are 2 choice with dealing this decision: (1) Transpile literal array as native JS array (like PureScript) (2) Transpile literal array as singly-linked list (like Haskell and Elm)

About (1), better explicitness, since no built-in conversion, however might confuse new user.

About (2), its easier to let newbies to try out stuff, since they no need to convert literal array to list all the time.

wongjiahau commented 5 years ago

Finally stick with (1), because (2) introduces too much implicitness.