What do you DISLIKE in GDScript?

Typed dictionaries will are going to be shipping in Godot 4.4, but it is also very valuable to have people testing GDExtensions and making it viable to use other languages with the Engine!

1 Like

Well, GDScript has own path. If you learn it, you won’t use it anywhere else. So what is wrong with javascript?

Why this?
var health : int = 100

When this is more intuitive?
int health = 100;

Or why this?
func select_some_action(some_action : SomeAction) → void:

When this is much more intuitive?
void select_some_action(SomeAction some_action) {
}

They tried to create something new based on python, but in the end they did a bad job with python. Javascript style would be much more intuitive. There are millions of javascript developers who master this style and don’t plan on learning anything new. Gamemaker in GML does javascript style and is very intuitive.

Maybe I’m the only one who has this opinion :melting_face:

1 Like

Newer languages are leaning towards pascal’s type notation, like Rust, TypeScript, and Zig. Python uses colon for type declarations too.

Not so applicable to GDScript but function pointers are significantly less intuitive with C style type declarations. GDScript is also optionally typed, so how would you remove int or void from your examples?

Honestly don’t know how a developer dead set on not learning anything new would break into games or Godot.

Edit:

As a teacher I’d love to touch on this too. There are programming fundamentals which traverse any language because of their roots in computing, such as functions, be it defined by func, fn, def, it all refers to another block of code that may be re-used and self-referential. Scripting languages will transfer knowledge to one another; once they have learned a language most programmers can learn a new syntax within a day.

The game engine even shares similar characteristics to one another, especially in physics/collisions or navigation, but only because these algorithms have had so long to settle and become widely used. If you were making your own game engine, you would use A* and Coordinate Descent. Other concepts without concrete solutions will vary from engine to engine, like how to produce content and handle networking or inputs.


I would argue types should be required, but I really like the syntax, it’s a huge improvement over C style declarations. “The spiral rule” is a horrible starting point.

3 Likes

I will not argue. I still prefer GDScript over C# in Godot, but I still find GML style much more intuitive and readable over GDScript. Maybe it’s just me. Consider that arduino language is very similar to GML, and what success it has, GDScript does not have such success and a lot of potential users asked for C#.

I think you will very much like C/C++ then, arduino is C++ with libraries. GML is based on Javascript which is syntactically similar to C. You might hate Elixir and CLISP! I think it’s important to get a breadth of language styles, surprising how all talk to the same computer.

What was your first programming language?

2 Likes

I dislike that:

var someArray : Array = [
    value1,value2
    ]

is valid syntax, but:

var someArray : Array = 
    [
    value1,value2
    ]

is not valid syntax.

I prefer to have brackets/braces line up.

1 Like

This can only work this way

	var someArray2 : Array = \
		[
		"value1", "value2"
		]
2 Likes

I hadn’t thought of that. Thank you!

2 Likes

Regarding loading order or maybe rather build order, some of my errors usually occur when I’m editing and forgetting that I hit the build and play button. Sometimes this leads to some file corruption, too, and worst a .godot folder with messed up imports.

Providing a sandboxed environment probably is not worth the effort. Maybe they can just change the play window background to bright red or add a transparent overlay that says “PLAYING LIVE” would suffice.

For those who might be interested: Frequently asked questions — Godot Engine (stable) documentation in English

1 Like

I assume that is because GD Script is interpreted. I can’t see how spaces would slow down a compiled language, but I am not very knowledgeable on this topic.

I really dislike that.

When you have long expressions… like mathematical expression u can’t use multiple lines unless you do that or enclose them in parentheses.

It’s not true, parsing tokens is blazing fast, reading 4 bytes instead of 1 byte will not slow down performance much if at all. GDScripts are transpiled to a compressed format with only tokens, not text once you export the game.

3 Likes

They don’t (spaces) most languages go from text script to tokens to parser AST tree and then byte code compile for the interpreter to read and execute.

So anything text is irrelevant when the code is being executed, like night and day worlds, not the same at all. :rofl:

(this intermediate parse and compile is how compilers can optimize code)

2 Likes

Mine is simple: it’s not Lua.

“The fact that I can take a released game, open the .pck (yes, there are some limited ways of protecting it) and then open the contents in Godot and have the full project, code, comments, debug features, assets, everything is baffling. Basically making multiplayer games a no-go as hacking becomes trivial, not to mention pirating.”

Does this happen if I use a language other than gdscript?

If I use C# does this happen?

@leandro Everything can be reverse engineered, its not a unique weakness of Godot. All software is hackable. You need to program safely when exposing your game to the internet, as all devs should!

3 Likes

Hehe, that’s a good one, it’s one of the first ones that used to come to my mind. However, that changed when I read Godot initially used Lua.

I know, it’s what initially attracted me to Godot back then.
Been in love with Lua for gamedev for 20+ years.
I’ve added it to Torque (in garage games days) and Cipher game engine back then, as well as POC for proprietary frameworks and console engine at two major game studios, one in the mobile field, the other on a hacked up publisher demo that ran on one core on xb360 devkit consoles.
Never really understood why Godot rolled its own when Lua is so easy to extend, whether in vanilla or JIT guise.
So yeah, Lua ! :full_moon_face::sparkler:

1 Like