Whoa, the Dotty extension method syntax has gotten all goofy:
def (c: Circle) circumference: Double
instead of the C# style
def circumference(this c: Circle) : Double
-
-
As an unnecessary visual metaphor perhaps, but instead of "def name args" it's "def (name args) OR (args name args)" which is unusual & novel syntax for a boring feature that every other language has boring syntax for.
-
I think I'm missing something…the location of the def determines where it is defined, and the syntax between the def and the `=` just resembles the callsite. Any other order would involve mental reordering between definition site and callsite, or defining elsewhere, wouldn't it?
- Show replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.