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

This is not 100% true, just see the efforts of Google in optimizing string allocation on Chrome.

Just because a language offers zero-cost abstractions, doesn't mean performance comes for free, one needs to know how to use them properly.

And be clever to chose libraries that are also designed with performance in mind.




In Rust or C++, you can make the abstractions zero-cost with some effort. I'm many other languages, you can't, no matter the effort.


Yes, but that "some effort" also has a development cost, which might be worthwhile or not, depending on the use case.

Going a bit off-thread, Ada, Object Pascal, Active Oberon, D, Nim, Modula-3, Swift also offer such capabilities.

C# also has on their roadmap plans to adopt more features from System C# and Midori, specially when coupled with .NET Native and CoreRT.


I would say std::string and std::io are special cases and somewhat atypical. Both have large performance overheads. I think the standardization committee blessed existing implementationsite that had become popular rather than design one with performance in mind. Strings really ought to have been immutable by default.




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

Search: