Re:What do I think about Lua after shipping a project with 6...
by misiek08 on Friday April 18, 2025 @06:07PM
(#43732251)
You mean compiler vs client reporting issues? Never safer.
[ Parent
| on HN ]
Re:What do I think about Lua after shipping a project with 6...
by felipeccastro on Friday April 18, 2025 @06:22PM
(#43732349)
Yes, but in practice, is the difference significant enough to matter? I’m genuinely looking to see if I’m missing anything when favoring Python type system over Go’s.
Re:What do I think about Lua after shipping a project with 6...
by pansa2 on Friday April 18, 2025 @08:49PM
(#43733255)
One difference is that Python's type system is unsound. You can write code that passes `mypy --strict` but still contains functions that, for example, claim to return an `int` but actually return a `list` [0]. AFAIK it's not possible to circumvent Go's type system in such a way.
Re:What do I think about Lua after shipping a project with 6...
by kbolino on Saturday April 19, 2025 @08:59AM
(#43736098)
The biggest limitation of Go's static type system vs. Python's type hints system that I can think of would be the lack of union types, with nullability a close second (and it's just a specialized application of union types in Python). An interface in Go can be anything under the hood, though you at least know that, whatever its concrete type, it does implement the methods exactly as defined.
You can definitely circumvent Go's type system with unsafe operations (with FFI also recognized as inherently unsafe) but that's a clear boundary that you know you're crossing (albeit not quite as clear as e.g. in Rust).
Re:What do I think about Lua after shipping a project with 6...
by pdimitar on Saturday April 19, 2025 @12:27PM
(#43737442)
It matters the most in practice, actually. Much less production all-hands-on-deck situations.
The fact that there still exist people to whom this is not painfully obvious is despairing me.