Post

gdscript as a language is like... weird its elegance comes from how nicely it integrates with Godot, like the dedicated syntax for signals, exports, custom node types, etc. but elsewhere, there are so many papercuts and seemingly missing features that it feels awkward to write at times

no keyword arguments - feels puzzling that one wouldn't take one of the best features from its primary source of inspiration, Python no structs/record/dataclass equivalent - tiny small-scope well-typed structures are still best made with class definitions and verbose Java-style constructor init

0 reposts0 likes

and the big one: the type system on the positive, it's nice that it has good inference (usually) and runtime validation. I'm glad it exists, and I'd rather have what's here than have nothing. but what's here is rather... frustrating

map/filter/reduce - you'll run into problems 95% of the time using these functions because lambdas are not well-typed. map and filter don't narrow the type of array items, so you need to awkwardly and unsafely cast the resulting array a lot of the time

`is` doesn't narrow variable types... kind of? if you write this: if item is Actor and item.on_stage: the `item` variable isn't narrowed after `and`, but with this: if item is Actor: if item.on_stage: you get autocomplete, but the type is still seemingly unchanged? scary and confusing