Closed freekh closed 10 years ago
Oops, thanks!
Lovely pattern match example! I'll incorporate it.
:) cool
On July 8, 2014 7:56:26 PM CEST, Jacob Leverich notifications@github.com wrote:
Oops, thanks!
Lovely pattern match example! I'll incorporate it.
Reply to this email directly or view it on GitHub: https://github.com/leverich/swiftislikescala/pull/3#issuecomment-48375877
Sent from my Android device with K-9 Mail. Please excuse my brevity.
Hey Fredrik, I got around to adding the pattern match example. Thanks!
Also, I'm going to start compiling comparisons to more "idiomatic" usage of Scala to show along-side the rote translations from swift -> scala. If you have any suggestions, feel free to shoot them this way. Look at the "tuple return" comparison as an example.
Cheers, -jacob
On Tue, Jul 8, 2014 at 10:58 AM, Fredrik Ekholdt notifications@github.com wrote:
:) cool
On July 8, 2014 7:56:26 PM CEST, Jacob Leverich notifications@github.com wrote:
Oops, thanks!
Lovely pattern match example! I'll incorporate it.
Reply to this email directly or view it on GitHub: https://github.com/leverich/swiftislikescala/pull/3#issuecomment-48375877
Sent from my Android device with K-9 Mail. Please excuse my brevity.
— Reply to this email directly or view it on GitHub https://github.com/leverich/swiftislikescala/pull/3#issuecomment-48376160 .
Yeah, I like that! Swift is like verbose and imperative Scala :) I wish Swift could have been expression based as well (most statement "returns" a value) - this is one of the features of Scala which makes code much easier to read (for my eyes at least).
Hi! I like this comparison! I think I found a minor issue, corrected by this PR.
Also, how about adding a pattern match part as well? I guess that is the way you typically check types and downcast (at least in Scala?). I do not have the Beta 3 so cannot try it out but I guess it would be something like: