You are reading a single comment by @dferyance and its replies. Click here to read the full conversation.
  • I can see the lack of regex being a limitation. FunScript translates the .Net regex library into JavaScript regex calls rather than implementing an engine itself.

    The good thing with compiler output is it tends to follow similar patterns rather than using a large mix of programming language constructs. So I doubt lack of labels will be much of an issue.

    I haven't tried anything very large but I could see it running out of memory. The code it generates defines variables and functions more often than is truly needed. I might end up running it through an optimizer first. I am sure you don't have tail call optimization -- even the more sophisticated JS engines don't have it. It would be nice, but with a mix of imperative code not a blocker. I am not too concerned with speed of execution, that limitation is expected with the software architecture.

    I am just excited that it worked, and wasn't very hard to get going either. F# has nice features like computational expressions that help simplify async code better than promises or other techniques. I also like the pattern matching, better syntax and type checking.

    While the idea of JavaScript on embedded seems odd, it is very impressive that you got it working. I am sure that was quite a challenge. I am sure I will experiment more with the platform. Right now, I am just building out foreign function interfaces for the Espruino variables and functions.

About

Avatar for dferyance @dferyance started