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

I find C++ encourages more pointer use by default, which implies all things are in memory at all the time. C on the other hand has this less implicitly, so things such as handles, deferred messages vs straight method call, have less of a.. friction?

Now you can wrap them up in C++, but then making such things hidden I think defeats some of their usage.

A managed runtime should be handle this better, but I don't know of any Java or .NET runtime that is optimised for a small memory foot print, perhaps paging from a larger virtual space[1]. I'd be interested to hear of any really.

[1] I do know there have been versions of Smalltalk that did basically this, but nothing recently that I've heard of.




Honestly, I remember making less than a 100k binaries playing c64 sid and doing a whole bunch of other stuff about 15 years ago(I would have said 16kb, but I don't really remember the numbers). I believe I mostly disabled RTTI, but I wasn't very good at reading manuals and understanding C++ back then, so I ended up patching the compiler instead.

You could argue that if you end up disabling all the fancy stuff from C++ why use C++ at all. But anyway, you can definitely use C++ in low memory environments if you really want to.




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

Search: