Why ?
while learning Go
https://blog.golang.org/gos-declaration-syntaxin C
int x;
<-----
declares x to be an int
in Pascal
x: Integer;
----------->
x is integer
In Pascal is simple as aunt ADA say.
while in C, I read left from right at the same time
I have to find x and int from rigth to left,
as if I have to learn English and Arabic.
and worse
http://c-faq.com/decl/spiral.anderson.htmlhave to spin my head, ouch!
uncle Bob say colon : is a noise, while GO remove it for brevity
we can embrace it, but have to change our behaviour.
just move colon closer to type
x :Integer;
so x become clear, and colon become is, we can read it without a pause
x :Integer; // x is Integer
x int // x <pause> int
read it for your self
var
// read with is
IsOK: Boolean;
C: Char;
Flag: Byte;
ID: Integer;
Name: String;
Amount: Double;
// variable name become clearer
IsOK : Boolean;
C : Char;
Flag : Byte;
ID : Integer;
Name : String;
Amount : Double;
// less noise maybe ?
IsOK :Boolean;
C :Char;
Flag :Byte;
ID :Integer;
Name :String;
Amount :Double;
// read without is
IsOK Boolean
C Char
Flag Byte
ID Integer
Name String
Amount Double // do you mean double the amount ?
Ow man, F is fundamentally wrong.