browser engines 

webkit is still the only one which lets you do proper functional programming, huh

re: browser engines 

; { const sum = (() => {"use strict"; return (x,i=0) => x === 0 ? i+x : sum(x-1,i+x)})(); sum(5000000) }

Works On My Machine

re: browser engines 

@Lady based on this example being in JavaScript I assume you mean V8, then, rather than Webkit? I wonder why SpiderMonkey doesn't optimize tail recursion? I know they put quite a bit of work into supporting the WebAssembly tail calls extension efficiently, so there's some support somewhere in there already

re: browser engines 

@jamey no, i mean webkit (well, JavaScriptCore)

webkit has implemented PTC for ages: webkit.org/blog/6240/ecmascrip

chrome implemented in V8, but refused to ship, and eventually removed: v8.dev/blog/modern-javascript#

firefox bug is very sleepy: bugzilla.mozilla.org/show_bug.

more of a summary here: mgmarlow.com/words/2021-03-27-

re: browser engines 

@Lady I have learned a lot by reading all of those links, thank you 😁

Follow

re: browser engines 

@jamey i’d be very interested in <bun.sh/>, which is built on JavaScriptCore instead of V8, because i do think JSC is generally the better runtime (well, and i don’t like Google)

but unfortunately i don’t care at all about the kind of development they are targeting and my needs are much better served by Deno

re: browser engines 

@Lady at work I've been helping a bit to hack on SpiderMonkey, contributing to the effort my teammate Chris started and wrote up (cfallin.org/blog/2023/10/11/sp). we compile SpiderMonkey as a WebAssembly module so we can run JavaScript in our serverless platform without needing to trust the JavaScript implementation. I've learned a lot about that particular JavaScript implementation in the process and yet there's still so much more to learn

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.