3 ms·
1. Dynamically typed! 2. Ok that didn't work too well we've added static type hints. Does anyone know of any good embedded statically typed languages? It seem
by IshKebab 3y ago
1. Dynamically typed!
2. Ok that didn't work too well we've added static type hints.
Does anyone know of any good embedded statically typed languages? It seems to be a very unexplored design space. The only real ones I know of are AngelScript (which catastrophically fails rule 0 of programming languages) and Gluon which is just a bit too weird and aggressively functional for me.
- zkldi 3y agoWhat's rule 0?
- IshKebab 3y agoShow examples on the main web page. Try and find an AngelScript example. It's stupidly hard. Compare it to these web sites: https://dlang.org/ https://dlang.org/ https://koka-lang.github.io/koka/doc/index.html https://koka-lang.github.io/koka/doc/index.html https://vale.dev/ https://vale.dev/ http://mu-script.org/ http://mu-script.org/ https://go.dev/ https://go.dev/ https://www.hylo-lang.org/ https://www.hylo-lang.org/ Sadly Rust fails this too but at least the Playground is only one click away. And Rust is mainstream anyway so it doesn't matter as much. I completely failed to find a single AngelScript example accessible from my phone's browser. Even its Wikipedia page doesn't have any.
- vitiral 3y agoI made a prototype that works in 3000 lines of C github.com/civboot/fngi It was super fun. I'm going to be going in a different direction (Lua implemented in Lua, with Lua-library assemblers and assembly type system), but it's certainly very possible
- IshKebab 3y agoNice! Pretty interesting syntax. Not sure about / for comments or the function argument syntax but you have a solid point about not using " or ' for strings!
- vitiral 3y agoThanks :) FYI the real power of / for comments is /token to comment out one token. So useful to add a bit of doc sugar when calling something call(x\sugar) call(x/*sugar*/) Also Thing \(inline comments) other
- emmanueloga_ 3y agoPerhaps Roblox's Luau? It is Lua with gradual types and a sandbox-enabled VM [1]. "Luau aims to be backwards-compatible with Lua 5.1", so yep, still 1-based array and string indexing :-). -- 1: https://luau-lang.org/sandbox https://luau-lang.org/sandbox