Imagine not implementing a core feature of the standard for your language for 11 years now

@wallhackio To be fair, the computers that I care about programming usually only have an ANSI C compiler, so I must program in ANSI C and not in a later version of C...

@vaporeon_ I was complaining about JavaScript. The ECMAScript standard has required proper tail call optimization since 2015 and the engine used by Safari is the only major runtime to implement this

@wallhackio @vaporeon_ there’s an alternate universe where bumby would have been one of those type-systems-and-functional-purrogramming sickos; he absol-utely has the purrsonality fur that

@wallhackio @vaporeon_ funnily enough, C has no requirement fur tail call optimization, but gcc and clang recognize at least some cases where they can do it and just will

Follow

@wallhackio @vaporeon_ like if you compile void foo(void) { foo(); } the compiler will purrobably just turn that into an unconditional jump instruction

@aescling @wallhackio Gets turned into infinite loop that does nothing except jumping back to its own start, do I understand correctly?

@aescling @wallhackio But only if the compiler has implemented that kind of optimisation and decided to apply it here, otherwise you'll overflow the stack with an infinite amount of return pointers... C programmers would instead write while (1); or loop: goto loop;...

Sign in to participate in the conversation
📟🐱 GlitchCat

A small, community‐oriented Mastodon‐compatible Fediverse (GlitchSoc) instance managed as a joint venture between the cat and KIBI families.