4 ms·
To be fair to ChatGPT, trying to find good documentation for Ada +/- Spark hasn't been quite as smooth sailing as trying to find something for C++. > Ada has a
by Ygg2 1y ago
To be fair to ChatGPT, trying to find good documentation for Ada +/- Spark hasn't been quite as smooth sailing as trying to find something for C++.
> Ada has as much zero cost abstractions as C++ and Rust have.
Couldn't find anything about it (see above), but does Ada come with any monomorphization tricks?
- pjmlp 1y agoWhat does that to do with zero cost abstractions as described originally by Bjarne Stroustroup? The way generics are implemented in Ada compilers is implementation specific.
- Ygg2 1y agoHow exactly are you going to implement generics in a way that's: > What you don’t use, you don’t pay for. And further: What you do use, you couldn’t hand code any better. without monomorphizing the generics?
- pjmlp 1y agoBy letting the compilers decide the best way to implement them. Also I find funny this point of view on Ada, given the poor examples WG21 has added into the C++ standard library, that will never be fixed due to never-ending ABI drama.
- Ygg2 1y agoLook. I'm not against Ada. Not my favorite language but definitely huge step in the right direction. With that said. How does: > By letting the compilers decide the best way to implement them. Get you to zero cost generics. What if implementor just says "let them eat memory" and boxes the generic.
- pjmlp 1y agoBy the same way std::regexp gives you zero cost abstractions in handling regular expressions in C++.