Message from JavaScript discussions

October 2018

— Yep, and with NapaJS yes we can make it just like Go too


Oh shit, I didn’t think of that.... that’s a really good point, I think maybe I will try to keep everything as normal named functions then, which can be considered virtual functions that do not really exist in the scope

— The functions cannot actually exist, the theory of operation prevents them from being functions, but you can write them just like they were, and when the compiler transforms it, it can do the same transformations that I was really thinking of before

Message permanent page

— At the same time, you are kind of guaranteed not to conflict with a real function that has been named “spawn”, if you just use the key word instead, So the name is going to get longer to avoid this, and the code is going to get a little longer, and you can see where I’m kind of going with this.

Message permanent page

— Impossible, I have three been researching this for almost 4 years now, and I have looked at all the possibilities on how I can implement the the userland components like that

Message permanent page

— When you call the function, the cost is that the call stack expands, which actually makes context switching have massively higher overhead. More you allow that call stack to grow, the longer it takes to traverse up and out of the call stack to get to the dispatcher, which is the action required before you can context switch to a different stack

Message permanent page

— You can namespace it

— 😂😂😂😂 +1

— But if they look like functions, but don't act like functions (being first class, referential transparency), it induces other confusions

Message permanent page

— This is why you need to know low level

— By the way, for reference, the public arguments google engineers have been having about how to add these features to JavaScript, a lot of the smarter ones have been saying hey, we can easily do this in the JIT compiler

Message permanent page

— Add what? the coroutines?