3 ms·
I went C++ -> Python -> Scala. Still do Python. Don't do C++ anymore for the same exact reasons he mentions. The guy is a C++ hero and to hear him say those thi
by wheaties 13y ago
I went C++ -> Python -> Scala. Still do Python. Don't do C++ anymore for the same exact reasons he mentions. The guy is a C++ hero and to hear him say those things means a lot. I encourage you to keep playing around with Scala. Have fund with the Actor model. Enjoy GC.
- chetanahuja 13y ago"Enjoy GC." Can't tell whether joking or serious. I guess my bitter laugh covers both cases.
- AsymetricCom 13y ago"Enjoy GC" "Enjoy living on a boat" "Enjoy waking up at 2AM" and other ways being not free is freeing.
- jerf 13y agoIt's easier to start from a GC'ed language, and use escape hatches when you need them, then to start without GC and then realize that your program has become a mess because you don't have it. Many GC'ed languages have such escape hatches. Those that don't, well, don't start writing performance-critical code in them would be my recommendation. And also, do not miss his point about reference counting just being a form of GC. "Manual memory management" isn't really a thing that exists, there's a whole suite of memory management techniques and alternatives, and it's easy with something like "C++ with ref counting" to actually be experiencing the worst of all worlds (all the work of "manual" memory management with all the disadvantages of GC) if you don't deeply understand what's really going on with your memory.
- chetanahuja 13y agoFunny you mention the "worst of all worlds scenario" because that's exactly what I was thinking about your advice to start with a GC'd language and then escape for performance critical (which usually means huge heaps btw) parts. This plan combines you all the flexibility, predictability and reliable latency of managed VM systems combined with all the safety guarantees of a manual memory managed system.
- jerf 13y agoRead my whole first sentence again. Carefully. I think it does not say what you think it says. Furthermore, I still don't think you got the point that there is no royal road to perfect memory management. You can't just say the words "manual memory management" and pretend you've solved the problem, or indeed, that you've said anything at all. Many of the same "manual memory management" techniques that you might use are still readily available in "garbage collected" languages. It's not a boolean, it's a rich space. And thus, I stand by my first sentence.
- CCs 13y agoWe're in production with Scala since 2010 and for that use case it worked out pretty good. Not enjoying the GC at all, it is by far the biggest issue. Also keeping an eye on Go and D, but not yet committed.
- lttlrck 13y agoLearning how to manage memory is a tiny fraction of the work involved in writing complex applications, and it's done upfront. Not having to worry about it would only give a proportionally tiny increase in 'enjoyment'.