No.
Wanting two different white space characters that are indistinguishable from each other, when a single one will do, is stupid.
Also, YAML is stupid, as is every language that chooses to use whitespace as a delimiter (fight me python nerds).
An unofficial chapter of the popular Dull Men's Club.
1. Relevant commentary on your own dull life. Posts should be about your own dull, lived experience. This is our most important rule. Direct questions, random thoughts, comment baiting, advice seeking, many uses of "discuss" rarely comply with this rule.
2. Original, Fresh, Meaningful Content.
3. Avoid repetitive topics.
4. This is not a search engine
Use a search engine, a tradesperson, Reddit, friends, a specialist Facebook group, apps, Wikipedia, an AI chat, a reverse image search etc. to answer simple questions or identify objects. Also see rule 1, “comment baiting”.
There are a number of content specific communities with subject matter experts who can help you.
Some other communities to consider before posting:
5. Keep it dull. If it puts us to sleep, it’s on the right track. Examples of likely not dull: jokes, gross stuff (including toes), politics, religion, royalty, illness or injury, killing things for fun, or promotional content. Feel free to post these elsewhere.
6. No hate speech, sexism, or bullying No sexism, hate speech, degrading or excessively foul language, or other harmful language. No othering or dehumanizing of anyone or negativity towards any gender identity.
7. Proofread before posting. Use good grammar and punctuation. Avoid useless phrases. Some examples: - starting a post with "So" - starting a post with pointless phrases, like "I hope this is allowed" or “this is my first post” Only share good quality, cropped images. Do not share screenshots of images; share the original image.
.
No.
Wanting two different white space characters that are indistinguishable from each other, when a single one will do, is stupid.
Also, YAML is stupid, as is every language that chooses to use whitespace as a delimiter (fight me python nerds).
I agree on indentation as delimiter being stupid for a PROGRAMMING language, but for markup/data serialisation languages that are primarily meant to be human readable, it is a great solution.
Syntax can be your delimiter, and white space done how the human sees fit. That’s the proper solution, imo
Yeah well you're wrong.
Braces help everyone, just like punctuation does. Try and read a Cormack McCarthy novel and the importance of punctuation to denote structure for readability will become immediately apparent.
Using whitespace as a delimiter is just nerds min maxing too far.
I don’t know, I’ve never found Python structure remotely hard to read
Except when some chucklehead used two character intents. This is why tabs are superior; if you want to be squinty, be squinty. The rest of us get 8 char intents that make the logic easy to see.
Yeah well you're wrong.
Relax, this is clearly a subjective matter.
Lemmy is a niche of a niche. People can't relax around here.
Some people are just so incredibly "AKQCSHUALLY" about certain things. And they don't even see that there's no right or wrong, it's just your use case vs mine. Narrow-minded af.
I agree having two is stupid. That's why it should be a tab instead of multiple spaces.
The indentation doesn't even get parsed. It's just there for human readability.
Haaave you met python?
Everything that doesn't align with my subjective, personal mental model is stupid. 😭
I loathe YAML (and Python for that matter). Anything that uses whitespace as syntax is a problem. The exception is Whitespace, it gets a pass for being hilarious.
I couldn't agree more with you though - it's a problem with the tool. If it doesn't support tabs that's not my problem, and if the language used whitespace for style instead of syntax everything would still work fine.
Whitespace sensitive is devils handiwork, tabs vs soaces is simply making that evident.
The classic programming holy war. As far as code is concerned, just have a formatter for the language, whichever tabs or spaces the formatter uses. I just hit tab and let the formatter decide. I most use Rust and I honestly had to lookup if rustfmt used tabs or spaces because I honestly didn't remember.
As for the YAML part, that's just because YAML sucks
Tabs for indentation / Spaces for alignment
We have a 40+ year old software (still developed, but some stuff never changed). They have the software read tables from space separated files. They trouble is each line has to line up with columns above it, so if you have a long string in one row, you have to go to every single line and space them with empty space to all line up the same.
To make it even worse it was based on 80 character max, so if your column headers are more than 80, you create a second line with more column headers. So row 1 is your columns, row 2 is your next set of columns. Row 3 are spaced entries to line up with row 1. Row 4 are spaced entries to line up with row 2.
And word wrap dosnt work because column rows have a CR after them.
Its a freaking nightmare. This is why tabs are better
You can probably commiserate with the Japanese postal CSV, some of whose horror is captured here: https://www.dampfkraft.com/posuto.html
Oh, god. Humans did this formatting abomination twice?
Japan and IT have an ... Interesting relationship. If you can code, looking at parsing libraries can be interesting. There are all kinds of csv-ish abominations here. Multiple header rows, different headers if a line is empty, etc.
That sounds like a simple problem that could safely be fixed in a day or days depending on the size of the data set, with a high degree of confidence.
What if... we invented a character with the sole purpose of delimiting indentation?
People could even configure whatever width makes sense to them locally. We could call it fabulations with how fabulous it would be.
I too prefer tabs. It's always been that way. It annoys me when an editor tries to be smart with spaces, and insert auto indentation instead of an actual tab character. It annoys me even more when I press the tab key, and the editor interprets that as "I guess that means you want spaces.".
I will concede that tabs can be a bit too wide when you end up nesting a bunch of stuff, so I'm fine with them being displayed as a set of spaces, but when I hit tab, I want an actual tab character. Otherwise I would use the spacebar.
Most editors I've used let you set a tab width in units of spaces. I prefer tabs at a width of two spaces. That's the great thing about tabs though, we can all share the same codebase and set the tab width to whatever we each desire
That's my whole point!
I will concede that tabs can be a bit too wide when you end up nesting a bunch of stuff
Nope, that’s a code smell; if your code is veering off into the rhubarb because you’re nesting like crazy then that’s a signal to break up your function. 8 char tabs help you code better.
tabs have never been a consistant thing. its basically just a certain amount of spaces. I can totally see why tabs would not be used.
Exactly, and by design: each user is allowed to set their own tab width and not mess everyone else up.
Like 8 space tabs? Go for it.
Want only 2-space indents? Just update your settings.
The semantic mean of a tab is "indent" - it should be up to each user what their idea of an appropriate indent width is.
100% Whitespace should not be a funtional element of a language. Let me format it however looks best to me then just end the line with a ;
The kind of coding I do is amateur hour at best and I use tabs instead of spaces
It's neater and (for the kinds of stuff I do) works
Also makes finding my errors easier
Sounds like you're doing it right, regardless of what style guides say.
I knew someone was going to reference this. It's surprising that it took so long.
I have worked on projects that get run through automatic formatting when committed to repos
Perhaps you need something like that and you can auto format the way you want on the way out
The good reason I've heard is because it's consistent. Tabs can change length depending on what's displaying it (this is both a feature and an issue). Spaces will mostly be consistent.
However, you say the issue is with the tool, and I agree, but in a more complex way. A good tool won't really care which you use. A good tool can interpret them identically and adjust the display to your preference. Bad tools are why people will have a preference for one or the other, and the above is the good argument for (and also against) spaces instead of tabs.
i fought against tabs for years because I figured one character vs four will decrease file size (I'm old enough to remember a time when that mattered) but eventually gave up to spaces as I started working with more and more collaborators and found consistency to be more important than a few bytes. now if only we can solve line endings.
Maybe I'm confused, but it seems like you used to dislike tabs, but now dislike tabs?
I just forget about it because my editor changes my tabs to spaces so I usually hit the tab key anyway. Would prefer tabs, but it is what it is.
You should create an elaborate set of tiles making your case and attach them to the asphalt on roads to convince folks to switch.