Morph C++ into Javascript
blog.vjeux.com
blog.vjeux.com
In javascript, I find that you can just write code, while in C++ I feel that I need to plan out every design choice, need to protect against everything. While that's a good thing when writing production code, in certain situations (writing up proof-of-concept projects for example) it's just not what I want. I love that in javascript, half the time I don't need to give a crap - it just works.
Hopefully, as a side-effect of this project, I'll be able to do what I do in C++ as I do in Javascript - although in the long run that probably isn't a good thing. ;)
It was a bit more difficult than expected :(
This makes doing something like e.g. map(map(...)) extremely annoying.
Javascript (nor does, really, any other proper closure implementation) has no such issues.
Indeed, the following easy code ( http://pastebin.com/bjFWBrJq ) does not compile under Visual Studio: "function returning function is not allowed"
It works fine in g++ though.
I'll definitely be trying this out. Utterly awesome idea.