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

Do away with python-style ident? #1159

Open
arjunmenon opened this issue Jul 3, 2024 · 2 comments
Open

Do away with python-style ident? #1159

arjunmenon opened this issue Jul 3, 2024 · 2 comments

Comments

@arjunmenon
Copy link

Hi, I just discovered this project. Congratulations on achieving such high performance over luajit.

One suggestion, not sure how it will ring but just putting it out. Possible to do away with python-style ident?
Whitespace like that make it, to some extent, less approachable without IDE. Simple statements on newlines does the job and make it easier to script without worrying too much about visual alignment.

Curly braces are a nice addition for anyone used to a c-style lang.

Thoughts?

@borisbat
Copy link
Collaborator

borisbat commented Jul 4, 2024

can already use curly bracers. i.e. block can be open on the same line, and from that point on nested blocks are that of C style. and ; is required. we are currently discussing explicit C-style syntax via option \ code of policies.

@hasanyasin
Copy link

If the argument for curly braces is to have the same block of code with lines at different indentation levels, please don't! Please don't ever write code like that, ever!

One needs to use a proper text editor to code, not necessarily an IDE as suggested, but something that can at least keep the indentation the same as the previous line.

Whatever editor/IDE/tools one uses to edit code, code blocks should be properly indented with every indentation level marking the block beginning and end. Whether there are curly braces or not, if a block is not indented properly, it's simply a mistake that should be fixed.

I code equally in languages with both curly-braced (Go, JavaScript, C) and indented (Nim, Python) syntaxes. I prefer indentation for a very simple reason: We are engineers and I believe we would all agree on what redundant means. Curly braces are simply redundant like the semicolon at the end of each line. (Semicolons may be useful for multiple statements on a single line, which itself is bad usually, but otherwise just a waste of eyesight). When typing, there is not much difference, but when reading, all those redundant characters makes the code less clear than it could have been.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants