-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
Proposal: Add options in editor to allow visually replace {} brackets with indentation only and vice versa #69967
Comments
Related Issues and Documentation (Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.) |
My proposal is about option to change in Editor as per user choice and convert if needed, not to get rid per say. Like you have options to change colors etc, but I would go for auto-formating and option to type with indentation and live convert instantly - should not time delay |
This looks like a proposal for an editor config setting, not something for the Go project. |
GO community could test it and start with their GO environment to get more adoption- so it is GO language related indeed. |
It is Go related, but as the Go project does not provide an editor, this is not something that the Go project can fix. Opening an issue in this issue tracker is unhelpful, as we won't be able to make any progress on it. We don't use the issue tracker for general projects; we use it for things that we can fix. Thanks. |
A part of Python success is that comes with simply to use note pad like editor, as simply as BASIC had at time. Has all functionality needed and it is good start for user after download. I am surprise to hear that GO has no editor, this would help adoption. Editor with some simply tutorial to follow and with added format options as mentioned would be and advantage. |
Go has followed a path of providing an editor plugin that works with modern editors. See https://pkg.go.dev/golang.org/x/tools/gopls. |
Ok I use Visual Code for Python so will give it a GO as there is logic in this language and rel easy syntax. Brackets I will have get use to I guess. I see that C open slide library can be linked. I will do testing for speed like for loop 1 to 1 Billion for loop count etc then for image analysis. |
Go Programming Experience
Novice
Other Languages Experience
Python, BASIC- learning
Related Idea
Has this idea, or one like it, been proposed before?
NO
Does this affect error handling?
Should not as cosmetic visual fix only
Is this about generics?
Yes- about editor to match Python indentation
Proposal
I started learning programming last year... old school with '86 BASIC2 (GEM2 on 5.25" 360kb floppy) on 1986 8 MHz computer then 1991 QBASIC on 40 MHz PC386. Made QBASIC .exe functioning program and outcompeted Bing AI on math with both verions of programs.
1991 QBASIC had automatic formatting of text...
n=1 would give n = 1 when Enter was pressed and applied to all.
No modern Visual Code has it or Python IDLE shell can do it- we moved backwards 30 years.
BASIC syntax was clear, lots of good books (QBASIC by Example) teaching programming Foundation.
I am learning Python since April 2024- both Python and BASIC have best syntax, hence Python takes lead.
The Classes I don’t like- good it was dropped in GO.
The curly brackets I consider visual noise in all languages- they are not needed in modern times.
When typying, brain gets used to indentation quickly and VC creates vertical lines anyway to know what is where.
To bring back simplicity, the GO Environment should have option to auto hide brackets and replace with indentation or allow to type with indentation only (and auto create {} in the background- visually they not needed), option either type that or that. Auto convert instantly.
You would get more people from Python using Go- and it is good language but {} are no go for me. It is just noise.
This is example from W3School tutorial: ugly GO looking code, more complex code and you end up with too many brackets adding more lines of code, and time needed for brain to comprehend it, which is for what part.
These {} old school way should be eventually dropped while compiler still recognize it on old code, but allow to type modern way and instantly convert to curly brackets if needed to review, for those that prefer it.
In Python it is triumph of simplicity, clean code and it was easier in BASIC compared to GO:
There need to be some standardisation and I would say Python solved it the best.
Regards
Michal
Language Spec Changes
Applies to Editor only, environment code is typed
Informal Change
No response
Is this change backward compatible?
YES
Orthogonality: How does this change interact or overlap with existing features?
No response
Would this change make Go easier or harder to learn, and why?
Easier for Python developers
Cost Description
No response
Changes to Go ToolChain
No response
Performance Costs
No response
Prototype
No response
The text was updated successfully, but these errors were encountered: