There's almost nothing in there that's like C or C++. But there's a definite influence of .NET and C♯ with things like null-coalescing, null-conditionals, and interpolated strings.
Interesting, apparently the source also includes a (modified) version of the PUC Lua VM. Why don't they just generate bytecode for the existing VM and leave it as is (unless the modified version somehow would significantly increase performance)? What changes were necessary to the original VM to implement the language?
Well written and well documented. I will be trying it out. One drawback that I see is the use of packages from LuaRocks might be an issue and one does not really want to cope with compilation issues. But Lua is a beautiful language in any form.
Is it possible to use Pluto alongside with a binding library such as Sol2[0]? I don't mind not being able to set type hints in the bindings to use in some IDE, I can create stubs for it manually.
Would general-purpose programming include making a Graphical User Interface?
A simple and small language with GUI bindings and a graphical tool for laying out a design in a flexible manner with a responsive result is something a lot of folks would find useful.
This appears to be a pile of syntactic sugar on top of Lua, which is an idea which would have appealed to me a lot as a younger developer. But the older I get the more I realize that its almost never actually syntax or brevity that gets in the way in a software project and that this sort of thing often introduces a lot of cognitive overhead. It isn't that these extra doodads are hard to wrap your head around, but the fact that we have two very similar languages (Pluto, Lua) that we are interactive with on a regular basis (because Pluto works within the Lua ecosystem) and now we have to think about that a lot.
I think a lot of programmers when they first learn Lisp go crazy with macros, adding all sorts of flimflam to their programs because they can, but then eventually you realize that just makes life harder, or at least marginally more complicated, and you gradually give it up. Feels like a similar calculation could apply here.
Lot's of good stuff in there. My personal highlights:
1. classes
2. named parameters with default values
3. string interpolation
I love Lua, but it's a bit sad that everyone ends up hacking together their own OOP system (including myself). I would really prefer a standardized solution.
Named parameters are such an underrated feature IMO. It makes function calls so much easier to read, in particular if the arguments all have the same type. I know, we can "fake" named arguments by passing a single table argument, but this has some overhead and default values are still rather awkward to implement. The one big downside of named parameters is that the parameter names are now part of the public API.
I've heard that Lua can be configured to avoid dynamic memory allocation, potentially allowing it to be used in real-time safety critical contexts. I'm not sure if anyone has used it that way, but I wonder if Pluto retains this?
I like the idea of bundling Lua with bunch of batteries but the syntactic changes go too far. They seem to be lousily designed attempt at turning Lua into Typescript.
For example coalescing operator. You can do the same in standard Lua with or. Pipe operator might seem like cool idea, but the language needs to be designed around it (Elixir) or you need multiple variants (threading macros in Lisps).
i was expecting something dumb if i'm honest but it looks really nice, i would probably use this. it seems like the perfect extension of the "code vomit" speed of writing lua and moves it further in that direction imo.
the thing i like lua for is easily getting into that "flow state" of just writing code without having to think about "how should i approach this" but sometimes the lack of things which pluto addresses forces a level of verbosity that snaps me out of it. i often find myself hitting a mental roadblock where i think "like fuck am i gonna write that much code to do X, i'll just go work on a more fun part of the program and come back later".
15 comments
[ 2.9 ms ] story [ 35.8 ms ] threadLuau = Performance
Pluto = Features
Luon = statically typed
[0]: https://github.com/ThePhD/sol2
A simple and small language with GUI bindings and a graphical tool for laying out a design in a flexible manner with a responsive result is something a lot of folks would find useful.
I think a lot of programmers when they first learn Lisp go crazy with macros, adding all sorts of flimflam to their programs because they can, but then eventually you realize that just makes life harder, or at least marginally more complicated, and you gradually give it up. Feels like a similar calculation could apply here.
1. classes
2. named parameters with default values
3. string interpolation
I love Lua, but it's a bit sad that everyone ends up hacking together their own OOP system (including myself). I would really prefer a standardized solution.
Named parameters are such an underrated feature IMO. It makes function calls so much easier to read, in particular if the arguments all have the same type. I know, we can "fake" named arguments by passing a single table argument, but this has some overhead and default values are still rather awkward to implement. The one big downside of named parameters is that the parameter names are now part of the public API.
For example coalescing operator. You can do the same in standard Lua with or. Pipe operator might seem like cool idea, but the language needs to be designed around it (Elixir) or you need multiple variants (threading macros in Lisps).
the thing i like lua for is easily getting into that "flow state" of just writing code without having to think about "how should i approach this" but sometimes the lack of things which pluto addresses forces a level of verbosity that snaps me out of it. i often find myself hitting a mental roadblock where i think "like fuck am i gonna write that much code to do X, i'll just go work on a more fun part of the program and come back later".