I don't agree functional is the same as DVORAK. It's likely you just don't play in performant code land often enough for it to make a difference.
There's a time and a place for everything. My days of technological zealotry are long gone. Anyone posting anything like X methodology is bad, Y software is great, Z company is the embodiment of satan, are all getting a thumbs down from me. Use whatever you want. Strictly following any ideology is almost always the wrong answer.
I don't agree functional is the same as DVORAK. It's likely you just don't play in performant code land often enough for it to make a difference.
There's a time and a place for everything. My days of technological zealotry are long gone. Anyone posting anything like X methodology is bad, Y software is great, Z company is the embodiment of satan, are all getting a thumbs down from me. Use whatever you want. Strictly following any ideology is almost always the wrong answer.
If you actually watched the video, you would have seen he actually suggests a mixture of OO + Functional/Procedural as the best way. He is mainly railing against OO-Only zealots, which is what is mainly taught these days.
I don't agree functional is the same as DVORAK. It's likely you just don't play in performant code land often enough for it to make a difference.
There's a time and a place for everything. My days of technological zealotry are long gone. Anyone posting anything like X methodology is bad, Y software is great, Z company is the embodiment of satan, are all getting a thumbs down from me. Use whatever you want. Strictly following any ideology is almost always the wrong answer.
If you actually watched the video, you would have seen he actually suggests a mixture of OO + Functional/Procedural as the best way. He is mainly railing against OO-Only zealots, which is what is mainly taught these days.
That's kind of why I floated back from Java to C++. You can program C++ defensively in an OO way (paying special attention). While it can also be completely C functional as well.
Also doing I/O feels easier or makes more sense in the majority of cases.
Depends. Company code? Two spaces per level, just like the standard says. My code? Tabs.
FOUR
FOUR SPACES
Here is why anyone who uses tabs must be killed.
Let's say you have your text editor and some code like this:
return_value = function(this, function, sure, has, a, lot, of, arguments, I, had, better, put this, on, multiple, lines)
On lines 2 and 3, how do you indent? Even if your tab size is set to 2, it might not line up. You will have to combine tabs and spaces, a big no-no.
Whether it lines up or not, it's going to look right in your text editor. But then you share the code. Let's say your tab length was set to 4, and lines 2 and 3 have 4 tabs each. That's 16 spaces. But you don't know what anyone else's text editor is set to! What if their tab length is 2, or 8, or some other unholy number? What is the tab length set to on the Github Web UI? Your code will look awful and be all fucked up everywhere except for your personal text editor.
If you use soft tabs, where pressing the tab character actually creates four spaces, and never use the actual tab character, your code will always look correct no matter where it is displayed. It doesn't matter which text editor, or web site, or whatev.
If you use soft tabs, where pressing the tab character actually creates four spaces, and never use the actual tab character, your code will always look correct no matter where it is displayed. It doesn't matter which text editor, or web site, or whatev.
Wait are there people who use actual tabs? As in "\t"? I assumed the tabs vs spaces debate was more of a typing thing (space bar vs tab key). Fuck you people who use actual tabs.
If you use soft tabs, where pressing the tab character actually creates four spaces, and never use the actual tab character, your code will always look correct no matter where it is displayed. It doesn't matter which text editor, or web site, or whatev.
Wait are there people who use actual tabs? As in "\t"? I assumed the tabs vs spaces debate was more of a typing thing (space bar vs tab key). Fuck you people who use actual tabs.
Yeah there are people who use actual tabs. Similarly I'm not a fan of people who use spaces only and then can't be consistent throughout their code.
Comments
I do agree that encapsulation is whatev, though.
Also, that US map he uses in the video reveals him to be "that guy."
https://en.wikipedia.org/wiki/The_Man_in_the_High_Castle
You can program C++ defensively in an OO way (paying special attention).
While it can also be completely C functional as well.
Also doing I/O feels easier or makes more sense in the majority of cases.
It's not perfect by any means.
It's the wave of the future!
I'm actually surprised how close this is.
FOUR SPACES
Here is why anyone who uses tabs must be killed.
Let's say you have your text editor and some code like this:
return_value = function(this, function, sure, has, a, lot, of,
arguments, I, had, better, put this,
on, multiple, lines)
On lines 2 and 3, how do you indent? Even if your tab size is set to 2, it might not line up. You will have to combine tabs and spaces, a big no-no.
Whether it lines up or not, it's going to look right in your text editor. But then you share the code. Let's say your tab length was set to 4, and lines 2 and 3 have 4 tabs each. That's 16 spaces. But you don't know what anyone else's text editor is set to! What if their tab length is 2, or 8, or some other unholy number? What is the tab length set to on the Github Web UI? Your code will look awful and be all fucked up everywhere except for your personal text editor.
If you use soft tabs, where pressing the tab character actually creates four spaces, and never use the actual tab character, your code will always look correct no matter where it is displayed. It doesn't matter which text editor, or web site, or whatev.
Spaces only, or I cut you.
4 space tabs every time.
I once worked with someone who used 8 spaces, he was crazy.