Skip to content
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 Newline for arrays and dictionaries #4892

Closed
Shadowblitz16 opened this issue Jul 17, 2022 · 3 comments
Closed

Allow Newline for arrays and dictionaries #4892

Shadowblitz16 opened this issue Jul 17, 2022 · 3 comments

Comments

@Shadowblitz16
Copy link

Describe the project you are working on

Spaceship game

Describe the problem or limitation you are having in your project

Godot 4.0 is moving towards beta fast and along side #4278 I would like to propose this issue.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

I suggest that using '[' or '{' after '=' should be allowed after a newline.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

Please support this as a valid syntax

var array = 
[
    0,
    1
]
var dictionary = 
{
    0,
    1
}

Right now it throws a error.

If this enhancement will not be used often, can it be worked around with a few lines of script?

It would be used when people prefer...

var a =
{

} 

over...

var b = {

}

Is there a reason why this should be core and not an add-on in the asset library?

It's a simple feature and it would be consistentish with : blocks

func a():  
    pass 
func b():  pass 
@dalexeev
Copy link
Member

Use

var array = \
[
    0,
    1,
]

or

var array = [
    0,
    1,
]

@YuriSizov
Copy link
Contributor

Godot 4.0 is moving towards beta fast and along side #4278 I would like to propose this issue.

GDScript is already in the feature freeze mode, we aren't accepting or considering changes to the syntax at this point, unless they have already been approved before.

@Calinou
Copy link
Member

Calinou commented Dec 16, 2022

Closing due to lack of support (see reactions on OP and general lack of activity).

@Calinou Calinou closed this as not planned Won't fix, can't repro, duplicate, stale Dec 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants