5 ms·
> Personally though, I am fed up with abstractions that cannot be used when I really need them Abstractions are often leaky [1], this has been known for 20 yea
by astrobe_ 5y ago
> Personally though, I am fed up with abstractions that cannot be used when I really need them
Abstractions are often leaky [1], this has been known for 20 years. Deal with it?
> Actually, not finished yet. Anyone building recursion into their language, and not making sure that recursion can use up all the memory available if so needed, is just not doing their job properly.
You don't "build recursion into [a] language", that's a direct consequence of having any form of subroutine call. You don't have to do anything except maybe making sure the function "sees itself", if you have lexical scoping. Even assembly language has recursion. Which makes recursion... Not an abstraction at all.
[1] https://en.wikipedia.org/wiki/Leaky_abstraction https://en.wikipedia.org/wiki/Leaky_abstraction
- auggierose 5y agoLeaky abstractions are for people who are too lazy to think. And computing is full of them. And of course you build it into the language. It might happen to you by accident, but if you kill somebody by accident, it is still manslaughter. Well, maybe not if your name is Alec Baldwin. Look at Apple Metal and the version of C++ they use for it. Try to make a recursive call there. Good luck.
- 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.