Hacker News new | past | comments | ask | show | jobs | submit login

I don't see closures. That's one of the most powerful aspects of Javascript.



Just added a part on Closure: http://blog.vjeux.com/2011/javascript/jspp-morph-cpp-into-ja...

It was a bit more difficult than expected :(


Good luck, last time I tried nested lambdas in VC10 they weren't able to capture local variables from any context except the immediate outer context.

This makes doing something like e.g. map(map(...)) extremely annoying.

Javascript (nor does, really, any other proper closure implementation) has no such issues.


I started developing with Visual Studio but their C++0x implementation is far from complete.

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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: