3 ms·
My personal anecdatal arguement against "Hard to parse for humans" is... I actually really like generics residing within <>. It's actually harder for me to read
by F-0X 6y ago
My personal anecdatal arguement against "Hard to parse for humans" is... I actually really like generics residing within <>. It's actually harder for me to read generics denoted otherwise (D uses parentheses)
As for the last paragraph, I'd implore language implementors to continue using < > lest we get that awfully ambigous nonsense.
- seanmcdirmid 6y agoScala uses brackets for generics and parens for array accesses. It works nicely, I think. The primary argument against < and > as generic brackets is that the ambiguity can make for some confusing error messages. It also prevents you from pre-matching your braces before the parsing phase (a technique that enhances error recovery).
- dhosek 6y agoMaybe it's my bias of having been introduced to parameterized types via C++'s template mechanism, but I find that <> looks natural to me and Scala's use of square brackets feels off. In general, I find myself preferring C-derived syntax.