Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yeah. Languages like C# and Java offer you so much facilities and QOL features compared to C and C++, but in practice you have to give up most of those facilities in order to have it perform almost on par with lower level languages; Even then I think it's still acceptable since you still have the tooling, the facilitated debugging, etc. C# for example, is keeping up with this trend of using higher level languages to code things closer to the metal and with more memory management awareness, and offering more and more features to make that kind of code more performant and with less heap allocations, since C# 7.0 or so: Span<T> for example is a revolution; But I use things like stackalloc, ref, fixed, Unsafe.CopyBlockUnaligned, &MemoryMarshal.GetReference etc, on a daily basis to get that extra performance where it matters;


That was exactly what made me pick C++ over C already in 1992, ability to code at all levels in a modern programming language.

Nowadays I rather use Java and .NET, which have been picking up on the features that should have been there at v1.0, like the ones you mentioned, but hey better later than never. :)

And on the few cases where it isn't enough, I can code a tiny library in C or C++, no need to throw everything away.




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

Search: