3 ms·
You'd have to show me some data that one is easier to work with than the other, because fundamentally types _are_ names, and I find them just as expressive as v
by thom 7y ago
You'd have to show me some data that one is easier to work with than the other, because fundamentally types _are_ names, and I find them just as expressive as variable names (many of which are just named after types, lets be honest). Even if I didn't, I don't think my brain struggles to read things in either order (or indeed in languages where types are rarely mentioned).
- Ar-Curunir 7y agoI mean most programming languages put some sort of punctuation between names. Eg: function calls are punctuated by parens, imports are punctuated by `::` or `.`. The same should happen for types.
- thom 7y agoI think the vast majority of code that exists in the world today has at most one space between a variable and its type.
- Ar-Curunir 7y agoThere’s a difference between “things that are implemented in popular programming languages” and “things that are implemented in most programming languages”
- thom 7y agoYes but you’re clearly making some sort of argument by authority and I think that works both ways. I just don’t see any reason to hold firm beliefs either way on such a trivial issue unless someone has a citation that I’m missing that proves one form increases comprehension or productivity, or reduces bugs.
- adamnemecek 7y agoIt's easier to parse if nothing else.
- thom 7y agoHow would you prove that?
- adamnemecek 7y agoTry to write a parser for both and compare the results.
- thom 7y agoOutside of the hellish ambiguities of C and moreso C++ it doesn’t seem like a big deal.
- Ididntdothis 7y agoThat seems to be the main problem. Otherwise it’s just something to get used to in my view.
- adamnemecek 7y agoI think it also makes more human sense. The parameter name should in some sense be telling you more than just the type. Like "size: Size" is kind of repetitive.
- Ididntdothis 7y agoI don't know. Seems programming languages are cryptic no matter what.
- adamnemecek 7y agoThey are not cryptic. They are trying really hard to come up with good syntaxes and semantics actually. I think that modern programming languages tend to have very clean syntaxes.