• Tanoh@lemmy.world
    link
    fedilink
    English
    arrow-up
    2
    ·
    2 days ago

    No, it really isn’t dope. It is okish, there are far worse but also far better. But the whole idea of forcing people to learn a new language is bad, and needs to stop. We do not need more languages, we need better languages.

    • Indent based flow control is a massive fail right from the start.
    • No short ternary expressions (there is a convoluted one), which is something you do super often. Makes no sense to not include it. Just because you can abuse things is not a reason to not include them.
    • Lambda functions only exist on a select few, and not as native. Instead you call them with another method name.
    • Some confusing naming, for example class vs class_name which means completly different things. The latter should have been something other than class with a name suffix.

    All in all, it is not bad. But certain aspects of it are not that good. The main point is that forcing people to learn a new language raises the bar of entry a lot. I think that is one of the things Unity got right, for the most part they used microsoft java (aka C#), with all its warts.

    Speaking of which, if there are native bindings. Why does the .net version even exist as a separate download? And why aren’t there bindings for other languages? At least I haven’t seen any, everyone just says “use gdscript. C# version is older and not well maintained”

    If there are first class bindings, then great.

    Edit: I would be very happy if there was a way to write in typescript, lua, perl, c# (without .net), etc… even if I had to drop in a plugin to support it.

    • psycotica0@lemmy.ca
      link
      fedilink
      English
      arrow-up
      1
      ·
      2 days ago

      In the end a lot of this is taste but:

      Indent based flow control is a massive fail right from the start.

      By some metrics, Python is the most popular programming language in the world and has been for a long time. So the thing that’s a massive fail right off the bat to you, is actually the lowest a barrier of entry gets. Simple GDScript starts out as basically a Python variant.

      I’ve been a professional programmer for 20 years (not in Python) but I’ve never used C# and all the bits of it I’ve seen seem awful, like Java which I have used and hated every time. If Godot had been a C# system it would have been harder for me to get into it and enjoy it. Personally. I think the only reason they offer it at all is to try and appeal to Unity migrants.

      GDScript was meant to be a gentle introduction. You’ve got a thing on the screen, and you want to just quickly move it when the cursor moves and it takes a few lines of code, every one of which is just about that intent. The way it has built-in syntax for addressing the hierarchy of nodes specifically encourages their use and incentivizes their design philosophy. I love functional programming typically, but I don’t think I’ve ever missed having a lambda in GDScript, because I’m making a videogame, not transforming a data pipeline.

      Things like class and class_name are a smidge confusing, sure, but both are essentially advanced features. The normal way to make a class is to make a file, and the normal way to refer to it is to include it in your node hierarchy, or by filename in a weird case.

      So the GDScript is meant to be “progressive”, like a scripting language, where it’s a few lines to add a bit of interaction to something, where every line is there for a reason rather than boilerplate, and there are more advanced features if you need them, but they’re not front and centre most of the time. I think most of the problems you’ve mentioned are just baggage you’ve brought from your other languages, but aren’t needed here.

      So anyway, it’s taste. But fundamentally, I think the thing we disagree on most is “we don’t need more languages, we need better languages”. I get that, but disagree. I love a domain specific language, I love a purpose-built feature, and would much rather see a garden of variety rather than have everything be Java and C#.