4 ms·
> Leaky abstractions are for people who are too lazy to think Worthless blanket statement. > Look at Apple Metal and the version of C++ they use for it. That
by astrobe_ 5y ago
> Leaky abstractions are for people who are too lazy to think
Worthless blanket statement.
> Look at Apple Metal and the version of C++ they use for it.
That's a very specific case of a shader compiler that is disguised as C++. It has a terrifying list of restrictions (for a C++ programmer), and I would say that recursive calls are the least of your problems there.
Obviously, it is not a design failure but a set of hard constrains that lead to those restrictions. Of course they would give you recursion happily if they could. People who can do that sort of compiler are not idiots.
It just shows that you understand little about languages. Yet you think you are in position to comment on language implementers' and designers' jobs. Say hello to Dunning and Kruger.
- auggierose 5y agoMy example shows that recursion is a design choice. It doesn't "just happen to you". But you are right. You can implement recursion properly by just implementing function calls properly, and making sure that you are not limited by an arbitrary and usually small stack size. It's just that if you don't have recursion, you usually don't have a need for deep stack sizes either. By the way, citing tropes like "leaky abstraction" and "Dunning and Kruger" is exactly the kind of lazy thinking I am talking about.