Closed ghost closed 11 years ago
This looks OK at a quick glance. Is there a reason you closed it?
I'm opposing the 'as expression' part (it provides little benefit, but complicates the language). 'as argument conversion' in parameter is nice.
I've closed this issue temporarily for a couple of reasons. Currently the 'as' desugars are done during loading, it works ok, but I'm going to try to desugar on demand. Also the commit history is a mess, i'll tidy this up a bit before reopening.
Tidied up the code/commits. I had a quick go at integrating the desugar into the match system without success. Seems to work fine as it is.
Sounds good. In my thinking, the 'as' expression isn't as important as the sugar for conversions, since the alternatives are either excessive instantiation or the boilerplate of having to write two overloads.
Removed as
as an expression/operator as it's not completely consistent with argument use.
Implement 'as' expression:
x as Int64
desugars too:alias overload asExpression(value, #T) = T(value);
The type consructor overload is a quick default and should probably be changed.'as' argument conversions:
desugars too:
Add couple of simple tests.