(no title)
TeddyDD | 8 months ago
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).
shayway|8 months ago
I don't mean to discount the work that has gone into it, and there are a lot of really neat features here. But honestly I think it would be stronger as a standalone thing, without all the lua baggage, given how far idiomatic pluto diverges from idiomatic lua.
[0]https://pluto-lang.org/docs/New%20Features/Ternary%20Express...
Lerc|8 months ago
local function report(result) print(result ?? "The value was nil.") end
report(filesize("/path/to/file/of/length/zero"))
If filesize returns nil for file-not-found and the length otherwise. Wouldn't coalescing work and or would not be able to identify existing but empty files.
90s_dev|8 months ago
It's particularly exciting that they constantly rebase upstream Lua, and plan to update it to be compatible with Lua 5.5. Especially because Lua 5.5 finally has the ability to turn off globals!