Thread with 14 posts
jump to expanded postgodot will be big. its "everything is a node tree" design radically simplifies things yet is also very powerful; gdscript is more approachable than python while providing best-in-class ergonomic gradual static typing; c# makes it friendly to ex-unity folks; and it's open source!
gdscript is just fantastic as far as i'm concerned. it has php's runtime-enforced optional type declarations combined with compile-time static typing with type inference. and of course it has real class definitions. why is nobody else doing this. peak dynamic language design
there's been a lot of concern that gdscript is too slow. and yes, it's not the fastest today, but it has a hell of a lot of potential. it could definitely achieve performance parity with c# in statically-typed code with some investment, without ergonomic sacrifices
a small but super neat thing about gdscript: file scope is class scope, carrying on the great legacy of game maker language and linden scripting language. it makes the scripts refreshingly un-cluttered, similar to non-oop python code, but with the cleaner scoping of c# or java
also i can't understate how amazing it is that godot is not bloated, not user-unfriendly, not underpowered, and it's open-source. this is an extremely unusual combination of properties.
look at this gdscript script i wrote just now, having barely touched the engine in years. there is only a single explicitly specified type here, but it's statically typed. there is no class keyword here, but it's oop. it's all that and familiar, beginner-friendly and readable!
(to get the equivalent, purely dynamically-typed version, you can remove the : float
and replace all the instances of :=
with =
, but why would you?)
i'm very excited to see where gdscript goes in future. gdscript has vectors and matrices as built-in value types and supports non-refcounted classes, even user-defined ones. these two things already give it more potential for gamedev than the vast majority of scripting languages
βͺthere aren't complex or user-defined value types yet, but the potential is there; the language hasn't made a hardcore commitment to an βeverything is a heap-allocated gc'able objectβ model like so many othersβ¬
as a rust enthusiast, i don't think gdscript is like, the best language ever or whatever. advanced c# users are going to be disappointed, and that's fine, they can use c#. what excites me is how much it improves on other languages in the game scripting niche, while staying simple
@hikari Damn, it looks pretty amazing. Godot has been on my radar for a while, maybe it's time to get into game dev! Also: "; as a statement separator is entirely optional" π
@hikari It's indeed really good because it mixes simplicity and familiarity with other languages.
However, I'm still not fan of the "the file is implicitly a class by default" strategy, I'd rather have everything be explicit, just like with Unity and C#, it allows for easier class-related quick documentation.
Or go full fledged and use Rust instead :p
@pierstoval i'm not sure if godot's way is really "less explicit". the extends
thing makes it obvious it's a class, and considering most java and c# files are just a single class anyway, gdscript is just avoiding boilerplate
@hikari After a decade of PHP, Typescript and other languages, I find this counter-intuitive that a single-file is by default implicitly a class π
Of course it's also a matter of taste, and as for all other languages we get used to it