Hacker News new | ask | show | jobs
by jesserayadkins2 3638 days ago
Const is something that I'd like to think over before adding it. A question I have is what happens if a List is const, or should it just be that only primitives are const? I could see const values being optimized as just literals down under the hood, which would be nice for performance.

I'd have to have a long, long think before adding operator overloading. It's got uses for math, but thus far I've been reluctant to add features that can be abused or used improperly like native class dtors or finally.

1 comments

Have you looked into the difference between c++ const and java final for an example of different semantics? Suffice it to say the two are very different. Not sure why anyone would be doing math code in an interpreted language, I guess if it where embedded in game engine that would be desirable, but then users may wrap c/c++ math libraries with swig-alike to use, using the ffi, whatever that turns out to be.