In some programming languages type of variable goes before it's name.
In another - name goes first and then type.
For example if I declare string:
String s = "some string"
Or
val s: String = "some string"
Which version loads brain less and allow easier think about problem ?
-
3$\begingroup$ I have no idea if this question is more appropriate for here or cs.stackexchange. Regardless, I'm pretty sure the answer is that we don't know. Heck, we just started to measure if curly braces are a good idea (they aren't). $\endgroup$– Seanny123Feb 27, 2018 at 22:36
-
$\begingroup$ I think this may also depend on the [regular] language [used to communicate in everyday life]. For example, English places its adjectives before the subject (type-object, e.g. 'wooden chair'), while in French its the reverse ('chaise en bois') $\endgroup$– AliceD ♦Feb 28, 2018 at 13:34
-
$\begingroup$ @AliceD But type isn't adjective, it's a noun that describes name. We say 'Lucky is a dog', i.e. <name> is a <type>, so type comes after name in English. Isn't it ? $\endgroup$– R SFeb 28, 2018 at 14:40
-
$\begingroup$ Yes that makes sense. Anyway, my point really was if you've done some research yourself so to scope the question. $\endgroup$– AliceD ♦Feb 28, 2018 at 19:33
-
2$\begingroup$ You're more likely to get an answer (if this has been researched) on the PPIG mailing list ppig.org/about $\endgroup$– FizzApr 14, 2018 at 18:47