>Preferred language
>Preferred indentation method
C, pic related for me.
I'm curious as if the preferred language has anything to do on how people indent code.
Tip Your Landlord Shirt $21.68 |
Tip Your Landlord Shirt $21.68 |
>Preferred language
>Preferred indentation method
C, pic related for me.
I'm curious as if the preferred language has anything to do on how people indent code.
Tip Your Landlord Shirt $21.68 |
Tip Your Landlord Shirt $21.68 |
i don't ident
t. js chad
What kind of troony indentation is this shit
Super-man style:
while(x==y){func1();func2();}
Don't skip the whitespaces, and that's fine by me!
K&R > everything else, though Allman still is ok (wastes a line, though).
>Haskell Style
Try it with json and you'll see the value in it.
Allman brothers rise up
In defense of Haskell/Lisp, they feel much more natural when used in Haskell/Lisp.
Allman for me
C++
C. I'd put the } else { all on the same line:
void draft() {
if (condition == true) {
//...
} else {
//...
}
}
But also shrink it to one line if it was small enough.
if (property.HasValue) {
// this
}
else {
// that
}
this. Im not sure about the namespace casing yet
namespace stuff {
class MyThing {
public:
MyThing();
virtual ~MyThing();
auto myFunc() -> void
{
if (x == y) {
//..
}
else {
//..
}
}
private:
uint32_t m_my_variable { 0 };
};
}
void draft()
{
if(Condition)
{
x();
}
else
{
y();
}
}
K&R is acceptable too.
There's only one indentation method silly billy.
I like Python, but the lack of graphs annoys me to no end.
>no column indentation in python
Python code bases look like shit because of this fact
Indenting with spaces is degenerate. I will die on this hill.
>Preferred Language
Common Lisp!
>Preferred indentation method
whetever picrel is called, I just let emacs do it for me
>else
UHM ACTUALLY YOU SHOULD SHORT CIRCUIT YOUR CODE SO NO ELSE STATEMENTS ARE EVER NEEDED
I usually just use the clangfmt Microsoft preset with tweaks here and there. It's annoying since it's sort of like Allman, but most langs defaults and accept conventions are more like k&r and it just annoys me.