Since people seem to enjoy making scripting languages so much (not meant to be a "dig", I like this)...here's a scripting language I'd be very interested in.
ZigScript
"A companion scripting language meant for Zig developers."
Zig is my language of choice, but I still reach for Python when I want to make something fast or "short lived". However, Python has downsides, it's hard to build the interpreter for it (especially a static executable), its packaging system is a mess and it's got some interesting syntax choices that would feel foreign to a native Zig developer, but overall I think the core of the language is brilliant. I imagine ZigScript as Python but in a "Zig Style" syntax with the problems fixed. Here are some features that come to mind:
- builtin types and/or syntax for maps/lists
- automatic memory management
- optional type specifiers?
- call to/from native Zig code?
Maybe ZigScript should be a superset of Zig? Maybe ZigScript should compile to Zig? These might be difficult features to implement though so I wouldn't start there. Where I'd likely start is create a scripting language roughly based on the Zig grammar, but with an eye for where changes can be made. If all changes could be "options" or "additions" then it would be a superset so I'd be mindful about what kind of changes I'm making.
When I look at zig zen
, all the points still seem to apply ZigScript...however, the priorities/tradeoffs change. For example we all
want code to be easy to "read" and "write" but these two are commonly at odds with one another and Zig declares a side. I think
ZigScript is on the same side as Zig but likely leans a little more towards the center, giving "writeability" a little more weight than
Zig would. Since both Zig and Python have their own zen's the differences between the two would likely serve as a great guide to what
decisions a ZigScript language would make.