|
|
|
|
|
by azolotko
2741 days ago
|
|
JVM knows nothing about generics. What kind of casts are you talking about? Trampolines are a common technique to implement tailcalls on platforms that don't support them natively. What are the horror stories then? Why would you bother with F# or Scala when iOS has Swift? |
|
Precisely! because the bytecode doesn't know about generics (it's syntactic sugar in higher levels, i.e. Java), then casts need to be performed at runtime (e.g. when getting an item from a collection).
> What are the horror stories then?
https://stackoverflow.com/a/18196685/544947
> Why would you bother with F# or Scala when iOS has Swift?
Haha, thanks for agreeing with me that Scala is not good in this regard. When I choose F# over Scala is because it can run in any platform. I'm not constrained.