|
|
|
|
|
by danbolt
375 days ago
|
|
> It has a terrible scripting language Curious, could you elaborate on what you find terrible about it? I’ve been toying around with GDScript for a little while, and I think it’s actually quite well-suited for developing 3D games. Or, they get a lot right with gradual typing, reference counting, and low-cost marshalling between native code and the script VM. The language authors know it’s a DSL, so they add specific features such as `$` and `@export` that are idiomatic to the engine’s architecture. |
|
Like, I'm a huge fan of gradual typing, especially TypeScript's, but gdscript's is just so primitive. Not even to speak of something like intersection or union types, even something basic like an interfaces mechanism is missing. has_method is an awful substitute - in general way too much relies on strings, making even simple refactoring a headache and breaks autocompletion. Lots of things also just aren't typable e.g. because generics are missing, pushing one to Variant. These aren't deal breakers, especially for the small-ish projects I've done, but it just feels bad.
A 'fully realized' version of gdscript would probably be great, but as is I'm just really not very fond of it and progress currently isn't exactly happening at a rapid pace (which is of course understandable).
Also - and this is definitely a lot more subjective - but I find its C++ FFI pretty ugly, even for basic stuff like working with structs. In theory using gsdcript as glue and C++ for the more core things would be a great approach (like unreal with its blueprints), but in practice I just want to avoid it as much as possible.