charly-lang / charly

🐈 The Charly Programming Language | Written by @KCreate
https://charly-lang.github.io/charly/
MIT License
199 stars 10 forks source link

Remove operator overloading from the language #156

Closed KCreate closed 7 years ago

KCreate commented 7 years ago

Operator overloading is only used at three places in the language

I suggest removing it since it adds a lot of overhead when performing calculations (type-checks after every step).

Operators as function names should be removed from the lexer and parser. Type-checking and redirection logic should also be removed from the Visitor. Maybe some examples need to be updated. Also the documentation needs to be reflected.

Array#+, Array#==, Array#! can be incorporated into the interpreter directly.

KCreate commented 7 years ago

Finished via #164