▲ | tacitusarc 2 days ago | |||||||
There is this recent trend of languages enforcing 2 space indentation and disallowing any ability to override. 2 space indentation makes determining block nesting hard for many (maybe most?) people, including me. My understanding is that the trend started as a way to skirt line length limitations in Python. I think it’s one of the dumbest trends in programming languages. Please stop. | ||||||||
▲ | itsn0tm3 2 days ago | parent | next [-] | |||||||
I have to fully agree. They have a discussion on their GitHub [0] about tabs/identation stating that the design goal is to have a non-configurable formatter. I get the idea behind having a streamlined formatting style, but I’m really not a fan of denying users the flexibility to adjust it to their needs. Consistency across projects is nice, yet forcing everyone into a single indentation style feels unnecessarily rigid. A little configurability would go a long way :) | ||||||||
▲ | 000ooo000 2 days ago | parent | prev | next [-] | |||||||
https://github.com/gleam-lang/gleam/discussions/3633 About the only argument I find remotely convincing from language devs (Nim is another similar lang) is that they don't want to maintain anything extra. Fair enough. The other arguments they roll out are always specious. The stuff in the issue above is comical: default GH tab width is 8, don't want Gleam to look weird to people looking at Gleam on GH, so force 2 spaces.. lol. Sometimes it seems like lang maintainers get a little too far up their own arses about this stuff. Your v0.x just-past-toy lang with a weak std lib and barely any ecosystem isn't turning off potential adopters because of how default indentation looks on one - arguably the worst - forge.. it's turning adopters away because of these silly hills you choose to die on. Nearly all mainstream langs handle spaces or tabs; forcing 2 spaces is just more "perceived strangeness", as a maintainer on that issue put it. It's your lang, do as you like with it, but if you want growth, don't be arbitrarily rigid. | ||||||||
| ||||||||
▲ | phplovesong 2 days ago | parent | prev | next [-] | |||||||
This is why tabs are better IF indentation is forced (luke in Go, with gofmt). | ||||||||
▲ | scotty79 2 days ago | parent | prev | next [-] | |||||||
Maybe you could just use tabs and save and read them as 2 spaces but display as 4. I think Idea IDEs have that flexibility... Not sure. | ||||||||
▲ | IshKebab 2 days ago | parent | prev [-] | |||||||
I agree. YAML does this too. It's dumb. I'll accept that tabs unfortunately lost the tabs/spaces war (too complicated for many people I guess), but let's at least stick to 4 spaces please. |