-
-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow implicit property typing with new properties #1880
Comments
"Ugly" is subjective. Code is read more times than it's written so in general I prefer to improve readability even if you have to type a bit more. |
Doesn't |
@vnen Thats why the value keyword would be highlighted in that case @KoBeWi Also if lambdas ever get added it would look more natural.
opposed to
It more of a preference issue and I think it should be optional |
Godot and GDScript are explicit by design, I'm against this proposal. Giving a name to the parameter is good. Whether you think it's ugly is not relevant, you have hundreds of functions with named parameters too and they don't seem to be a problem. |
Also see #844 and the number of thumbs down on this comment in particular which gives a pretty good idea that people voted against this. So is there any point in repeating the discussion, knowing it would meet the same conclusion? |
Why is having the option a bad thing? |
Haha, yes :) but first see this comment. I still think this can be a good idea, it's what C# does and it works fine there. To me it's clear enough. However, this won't happen due to the amount of people against this, so I'm closing this. Besides, the worst that could happen is that the code is a bit more explicit than necessary... which isn't all that bad. |
Describe the project you are working on:
NetworkTest
Describe the problem or limitation you are having in your project:
Nothing but looking at the godot 4 properties makes me want to commit sudoku
Describe the feature / enhancement and how it helps to overcome the problem or limitation:
currently I like the new properties the only issue with them is we have to do this..
var property: set(value): return value #<-value?
I suggest for a optional implicit value keyword when
(value)
is not supplied with autocompleateDescribe how your proposal will work, with code, pseudocode, mockups, and/or diagrams:
If this enhancement will not be used often, can it be worked around with a few lines of script?:
Its less typing so it would probably be used more then the current version and no
Is there a reason why this should be core and not an add-on in the asset library?:
properties are used quite often and having to type
(value)
for every one is an extra 7 characters and is honestly ugly in my opinionThe text was updated successfully, but these errors were encountered: