5 ms·
Disclaimer: I haven't used any of the languages you list other than C(++), unless you count first-term-student-level Racket as close-enough to Scheme (unlikely)
by Qwertystop 10y ago
Disclaimer: I haven't used any of the languages you list other than C(++), unless you count first-term-student-level Racket as close-enough to Scheme (unlikely), so this might be something that they cover but you didn't feel worth mentioning
I'm finding Lua/Terra quite interesting. Lua [1] is an extremely lightweight fast dynamic-typed interpreted (or JIT-compiled) language (don't forget to get the penlight library, though, because it's batteries-not-included otherwise). Terra [2] is a C-level bare-metal static-typed compiled language specifically designed both to use Lua as a preprocessor and to interleave with Lua code as necessary. I'm pretty sure it ends up as metaprogrammable as Lisp but without the difficulty I had parsing Lisp syntax (might not be an issue for you, given that you've got Scheme listed).
[1][http://www.lua.org/ http://www.lua.org/]
[2][http://terralang.org/ http://terralang.org/]
- SlySherZ 10y agoWhat are the ideas that Lua follows that are different from everything else? I'm not sure it's the language I'm looking for, but I will keep it in mind if I ever need something like it. Thanks!
- sheepmullet 10y agoIncredibly straight forward sand-boxing and embedding.
- Qwertystop 10y agoMinimalism, DSLs, and embeddability. It's got a very good API for binding with C, and is small enough to reasonably be included whole in any project if you don't want to have external dependencies. It's also extremely modifiable due to the minimalism - it's got a few primitive types, basic control-flow, and one structured type, the table (a key-value store) which is used for everything else from lists (integer keys, sugar exists for this) to sets (values as keys, "true" for values) to classes. Dotted attribute access is just sugar on string-key access, so methods are just functions with a "self" parameter (there's sugar to hide that) that you put in the table. Default-values and operator overloading - just specific keys mapping to appropriately-defined functions. I haven't looked much at JavaScript but I think it's a bit like JS's prototypes? Again, though - unless you need it tiny, you probably want Penlight or something like it to provide all the utilities that weren't quite basic enough to be core. In that case, you've got a good chunk of, effectively, the Python core libraries to work with.