3 ms·
>but in most situations it makes more sense for the type to be on the left. The reason being that it reads more naturally Not really. And the Tiger Woods examp
by coldtea 8y ago
>but in most situations it makes more sense for the type to be on the left. The reason being that it reads more naturally
Not really. And the Tiger Woods example is a whole phrase with a verb and an noun (describing what he did to whom), so not representative of a type declaration (which is just just describing what thing something of a specific name is).
So, it's more like:
Tiger Woods: a golfer.
vs:
A golfer: Tiger Woods.
Which of course is an argument for types on the right -- the first reads much better.
- Mirioron 8y agoIn my opinion the second reads better, because if you have multiple declarations (multiple rows) then they will all line up: Tiger Woods: a golfer. Jon Rahm: a golfer. Bryson DeChambeau: a golfer. vs A golfer: Tiger Woods. A golfer: Jon Rahm. A golfer: Bryson DeChambeau. This makes it easier to group up information when glancing at the code.
- makapuf 8y agoI don't understand the alignment argument. You can insert spaces (or your editor ) and align types on the right if needed.
- Mirioron 8y agoSo, will you go back and beautify code? When will you insert them? If there are 3 lines like that? 4? 5? It leaves so many questions that will have to be solved through "best practices" and everyone ends up doing it slightly differently.
- coldtea 8y agoThat's what TAB is for.