Message from JavaScript discussions

October 2018

— To be completely honest with you guys, I had the same issue for really long time because of how much I liked JavaScript, it never encouraged me to learn about all these different ways to do control flow, and multiprogramming

Message permanent page

— 

This is a really good metaphor for the system, and you could totally wrap all the stuff and promises to and get exactly that if you wanted to

— In fact, originally, when I was still figuring out the design, I was likely going to try that, and transform every single piece of the code into chains of promises, that the dispatcher would zip through

Message permanent page

— 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

Message permanent page

— 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