3 ms·
I didn't downvote, but I don't like the syntax for a couple of reasons: 1. Instead of being more like C-style function declarations, they look a lot more like
by rootlocus 11y ago
I didn't downvote, but I don't like the syntax for a couple of reasons:
1. Instead of being more like C-style function declarations, they look a lot more like C-style type conversions.
2. However closer it may be to C (type before identifier I guess?) it's pretty far from any other mainstream language. For instance, C++ has support for -> syntax for function types (http://stackoverflow.com/questions/22514855/arrow-operator-in-function-heading http://stackoverflow.com/questions/22514855/arrow-operator-i...) and some other languages (I can think of Scala) use name: Type declarations.
As a personal preference, I find the python type hinting more familiar than your example, despite (myself) being most familiar with C-like syntax.