Comment by 90s_dev
3 months ago
> Finally, we want a language that is easy to pick up; it should feel like a statically typed version of scripting languages you're used to.
It looks like Rust. All Rust scripting languages do. Is this true for all other languages? Is this just a property of embeddable scripting languages, they will always resemble the language they're implemented in and meant to be embedded in?
People who become proficient in Rust generally enjoy the syntax, so they want to carry it across. (As someone proficient in Rust who has pondered their ideal scripting language, I would have done the same.)
To your more general question: it depends. AngelScript [0] looks very much like C++, while others, like Lua, don't. It's really up to the designer's discretion.
[0]: https://www.angelcode.com/angelscript/, but https://angelscript.hazelight.se/ has better examples of what it actually looks like in use
> who has pondered their ideal scripting language
Et tu, brute? :D
> It looks like Rust. All Rust scripting languages do.
Not koto (https://koto.dev/) which is one of the reasons I appreciate it. I want an embeddable language targeted at my users, rather than myself which I feel Rust-like ones do. I also want an embeddable language not tied to my implementation language so if I change one, I don't have to change both. Koto only supports Rust atm but I don't see why it couldn't be supported elsewhere.
I think it's just that a lot of people like Rust syntax, and there is a lot of demand for a Rust-like scripting language (Rust syntax is also very close to JavaScript/TypeScript syntax which many, many people are familiar with)
> Is this just a property of embeddable scripting languages, they will always resemble the language they're implemented in and meant to be embedded in?
No. Think about Lua or Tcl (both implemented in C) or others like Embeddable Common Lisp.
True, but those were designed in the 80s or 90s. I guess I'm thinking of embedded scripting languages designed since ~2015.
IIRC Lua deliberately doesn’t resemble C - so if you’re going back-and-forth, editing both the host application code and a script, you can immediately tell which one you’re looking at.
Makes sense to me - which means scripting languages for curly-brace languages should probably use either Lua-style begin-end or Python-style significant indentation.
It is one of my issues with lua. I'm starting to forget semicolons in C/C++/Rust and write : instead of ::.
I think, that I'd better deal with a language recognition, I could configure emacs to use different highlighting for different languages. Or I could change background color for buffers based on a language.
I don't think that's the reason behind Lua's syntax. I think it was designed specifically to be extraordinarily unambiguous, clean, and simple, which it is.