-
Notifications
You must be signed in to change notification settings - Fork 10
/
STYLE
59 lines (45 loc) · 1.35 KB
/
STYLE
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
____ _______ ___ _____
/ ___|_ _\ \ / / | | ____|
\___ \ | | \ V /| | | _|
___) || | | | | |___| |___
|____/ |_| |_| |_____|_____|
It's important to rage against the web in _style_. Fellow surfer,
take these guidelines with you when developing revolutionary elvi:
FOR STATEMENTS:
Prefer
for something in stuff
do
whatever
done
over
for something in stuff ; do
whatever
done
IF STATEMENTS:
Prefer
if rage ;
then
surf
fi
over
if rage ; then
surf
fi
INITIALISING VARIABLES WITH AN EMPTY STRING
The var="" syntax is preferred over var=.
LEGIBILITY:
Revolutionary elvi are of greatest utility when they are readable. If
the consensus is that a breach of the style guide yields more readable
code, the more legible option should be chosen.
LEADING WHITESPACE
Tabs are preferred.
LINE LENGTH
Lines should be wrapped at 80 characters so long as it doesn't require
absurd contortions to fit this.
LOCAL VARIABLE DECLARATION
Function variables should be defined local. What happens in the
function should stay in the function.
PROCEESS SUBSTITUTION
Use $() over `` for legibility.
QUICHE EATING
This is generally frowned upon.