4 ms·
It doesn't and I hope whoever is in charge of web assembly doesn't ruin what they have by giving in to nonsense trends that are part of a silver bullet syndrome
by CyberDildonics 4y ago
It doesn't and I hope whoever is in charge of web assembly doesn't ruin what they have by giving in to nonsense trends that are part of a silver bullet syndrome and don't offer real utility.
- chriswarbo 4y ago> giving in to nonsense trends Tail-calls have been pretty standard since at least the 'Lambda the Ultimate GOTO' paper from 1977 https://en.wikisource.org/wiki/Lambda_Papers https://en.wikisource.org/wiki/Lambda_Papers For example, it's done by all of the Schemes, all of the MLs (SML, Ocaml, Haskell, Rust, Scala, Idris, etc.), scripting languages (Lua, Elm, Perl, Tcl, etc.), and many others. > that are part of a silver bullet syndrome and don't offer real utility Their "real utility" is right there in the subtitle of that original paper: Debunking the "Expensive Procedure Call" Myth or, Procedure Call Implementations Considered Harmful or, Lambda: The Ultimate GOTO In other words, any implementation of procedure/function/method-calls which doesn't eliminate tail-calls is defective (slow, memory-hungry, stack-unsafe, etc.)
- CyberDildonics 4y agoTail-calls have been pretty standard Not standard, since almost no programming is actually done using tail calls. Programming is done with loops, tail calls are an exotic and niche way of working. Even in lua and rust tail calls are rarely used and the other languages you listed are extremely niche. Debunking the "Expensive Procedure Call" Myth or, Procedure Call Implementations Considered Harmful or, Lambda: The Ultimate GOTO These are not explanations of utility, these are titles that you are using to claim something without backing it up. In other words, any implementation of procedure/function/method-calls which doesn't eliminate tail-calls is defective (slow, memory-hungry, stack-unsafe, etc.) This is a very bold claim with no evidence for it and pretty much the entire history of programming against it.
- chriswarbo 4y ago> These are not explanations of utility, these are titles that you are using to claim something without backing it up. That wasn't 'me claiming something', it was Guy L Steele Jr., who's worked on such "niche" languages as Java, Fortran and ECMAScript: https://en.wikipedia.org/wiki/Guy_L._Steele_Jr https://en.wikipedia.org/wiki/Guy_L._Steele_Jr. Also, it was literally the title of a paper. If citing the literature with a hyperlink to wikisource doesn't count as "backing it up", then I have no idea where you put the goalposts. > almost no programming is actually done using tail calls Literally every function/procedure/method/subroutine/etc. has at least one tail position (branching allows more than one). It's pretty bold to claim that there are 'almost no' function calls in those positions. I wouldn't believe this claim without seeing some sort of statistics. > Programming is done with loops, tail calls are an exotic and niche way of working. Loops have limited expressiveness; e.g. they don't compose, they break encapsulation, etc. Hence most (all?) programs utilise some form of function/method/procedure/subroutine/GOTO. Tail-calls are simply a sub-set of the latter which, it turns out, are more powerful and expressive than loops (as an obvious example: machine-code doesn't have loops, since it's enough to have GOTO (AKA tail-calls)).
- CyberDildonics 4y agoThat wasn't 'me claiming something', it was Guy L Steele Jr. You still just copy and pasted titles, this isn't evidence of anything. If citing the literature Then put in the part you think is evidence or significant. This is the classic "prove my point for me" routine. You're the one who wants to change a standard. Literally every function/procedure/method/subroutine/etc. has at least one tail position Are you conflating general functions with tail call elimination? Loops have limited expressiveness; e.g. they don't compose, they break encapsulation, Why would that be true? How would looping through recursion change this? Hence most (all?) programs utilise some form of function/method/procedure/subroutine/GOTO What does this have to do with tail call optimizations? Web assembly has functions. machine-code doesn't have loops, Web assembly is not the same as machine code I think overall you are thinking that making claims is the same as evidence. You haven't explained any core idea why tail call optimizations have any benefit in programming or web assembly. You basically just said a well known language creator put them in some languages. There is no explanation of what problem is being solved.
- iudqnolq 4y agoNitpick: Rust doesn't do tail call optimization (unless llvm decides to unprompted, iirc). https://github.com/rust-lang/rfcs/issues/2691 https://github.com/rust-lang/rfcs/issues/2691
- maxiepoo 4y agononsense trends like an "assembly" language supporting jumps?
- CyberDildonics 4y agoI will quote you from a different comment: WASM is not really an assembly language.
- maxiepoo 4y agoOne of the main reasons it's not really an assembly language is that it doesn't support jumps! This is fixing a defect!
- CyberDildonics 4y agoThis is fixing a defect! Only according to people using niche languages that are already slower than javascript but not anyone designing, implementing and using webasm.
- maxiepoo 4y agoThis would allow you to do things like compile other assembly languages to webassembly.
- CyberDildonics 4y agoWhat are you basing that on? If that were true then binaries for different CPU ISAs would also be able to be statically compiled to each other.
- maxiepoo 4y agoEven emscripten, which compiles LLVM to WASM has to use a relooper algorithm to get around the lack of jumps.