top | item 44433496

(no title)

TeddyDD | 8 months ago

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).

discuss

order

shayway|8 months ago

Yeah, there are a lot of odd inclusions like that; things that overlap or replace standard lua flow for no reason (see ternary expressions[0]). I would love an expanded lua, with built-in classes and a more robust standard library, but this feels more like a rewrite into a new langauge with two vastly different design philosophies layered awkwardly on top of each other. Which it is I guess.

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

I'm not a Lua user but is this a falsiness issue?

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

As a TypeScript fan, I was really happy to read pretty much every one of these changes. This is a language I wouldn't personally use unless it gains massive traction, but one that I hope it gains massive traction so that I can justify spending the time memorizing and learning all these new language additions.

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!