3 ms·
It virtue-signals that they're part of the hip functional crowd. (To be fair, if you are programming functionally, it is essential. But to flat-out state that
by zephen 10mo ago
It virtue-signals that they're part of the hip functional crowd.
(To be fair, if you are programming functionally, it is essential. But to flat-out state that a language that doesn't support isn't "serious" is a bit rude, at best.)
- mrkeen 10mo agoSupporting recursion only to a depth of 1000 (or whatever) is equivalent to supporting loops of up to 1000 iterations. If I put out a language that crashed after 1000 iterations of a loop, I'd welcome the rudeness.
- Ar-Curunir 10mo agoPlenty of languages, including very serious ones like C and Rust, have bounded recursion depth.
- mrkeen 10mo agoThen let me rephrase: If every iteration of a while-loop cost you a whole stack frame, then I'd be very rude about that language. This works, btw: #include <stdio.h> long calc_sum(int n, long acc) { return n == 0 ? acc : calc_sum(n-1, acc+n); } int main(void) { int iters = 2000000; printf("Sum 1...%d = %ld\n", iters, calc_sum(iters, 0)); return 0; }
- zephen 10mo ago> If every iteration of a while-loop cost you a whole stack frame, then I'd be very rude about that language. Well, sure, but real programmers know how to do while loops without invoking a function call.
- deleted 10mo ago[deleted]