You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • What are the pros and cons of embedded Javascript vs eLua (which could be precompiled)?

    It's a language that people actually know, there's lots of code available on the net, and you don't need a toolchain on the host. It's almost certainly not as fast, but if you were after raw speed and didn't mind pre-compiling then you'd probably be using C.

    maybe supporting type strong C var types to complement the flex var type of Jscript?

    Without a JIT compiler I don't think that will help a great deal - if you want a fast pre-compiled language that looks a lot like C, I'd suggest that you use C.

    Assembly is not portable across cores (not future proof)

    This is true, however I think it's safe to assume that every Espruino device for the next few years at least will run ARM Thumb, so you're pretty safe.

    There are instructions on the link @DrAzzy posted that show you how to use C code in Espruino. Ideally the Web IDE would directly support 'inline C' - but I'm yet to find a compiler that can be compiled to JavaScript that targets thumb. If someone wants to port TCC (which can be compiled with emscripten) from ARM to ARM Thumb then I'd be only too happy to directly include inline C :)


Avatar for Gordon @Gordon started