4 ms·
> Squirrel is written in C++. Wren is pure C99. Awesome. My primary interest in Lua and Squirrel was to embed a scripting language in a C environment on a micr
by phyllostachys 12y ago
> Squirrel is written in C++. Wren is pure C99.
Awesome. My primary interest in Lua and Squirrel was to embed a scripting language in a C environment on a microcontroller. This is perfectly doable (and has been done before) but Lua is particularly attractive because it is written in ANSI C.
I think it is interesting how similar embedded systems devs and game devs view their code with an eye towards performance and size. It is nice because embedded systems typically don't use newer languages and the developers tend to never move away from C as the language of choice (sometimes it seems like everyone is stuck in the 80s or 90s).
- munificent 12y agoI believe (but have no proof) that Wren is more amenable to running on a microcontroller than Lua or Squirrel. Wren has a more compact representation for instances of classes and simpler/faster method dispatch. It's still duck typed, but it gets closer to statically-typed language where an instance is a simple in-place array of fields and field access is just a pointer offset.