6 ms·
D did this a long time ago too. https://news.ycombinator.com/item?id=7530692 https://news.ycombinator.com/item?id=7530692 https://web.archive.org/web/20151113
by jordigh 8y ago
D did this a long time ago too.
https://news.ycombinator.com/item?id=7530692 https://news.ycombinator.com/item?id=7530692
https://web.archive.org/web/20151113173822/http://h3.gd/ctrace/ https://web.archive.org/web/20151113173822/http://h3.gd/ctra...
It should be noted that this was done in very old D, before a lot of compile-time improvements that modern D has. I guess makes this feat more impressive for the time, while the same exercise today should be more pedestrian.
It's really nice that D was built with this sort of application in mind instead of having it added 30 years later. It makes the language feel far more cohesive and inviting for this sort of thing.
If C++ were able to discard old features, I might not be so scared of going back to it. The way it keeps growing without pruning does not make it feel very inviting.
- rrmm 8y agoThe annoying thing about C++ is you need a big huge book to tell you which features are safe and how to combine them and stay safe. Maybe if they started defining a 'modern c++' subset that you could limit it to via compiler flags and/or pragma's it would make life a bit easier when starting new codebases. Obviously you can always make a personal style choice on what to use, but then you have to find one. Anyone have a favorite set of recommendations for c++ feature usage? Also, if you start with 'X did this a long time ago.' You always end up in a LISP-hole. :P
- 0-_-0 8y ago> Maybe if they started defining a 'modern c++' subset... Here it is: https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md https://github.com/isocpp/CppCoreGuidelines/blob/master/CppC...
- metabagel 8y agoGreat reference, although none of the hyperlinks on the page work for me. I tried Firefox, Chrome, and Edge. I also tried all of the older tagged versions.
- 0-_-0 8y agoFor me neither, try this instead: https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines
- rrmm 8y agoAwesome! Thanks for the info.