@mjtsai Optional and Array both fit in an Any…
-
-
-
@jckarter Is there a way to compare to Anys that I know are both Equatable inside? - View other replies
-
@mjtsai The generics features we're planning for after 3.0 should make it easier to work with Any and other dynamic types. -
@jckarter That would be nice. Right now, Any is hard to do much with. -
@mjtsai With some helper functions, you can get pretty lightweight syntax for forcing Any into static contexts: https://gist.github.com/jckarter/2762c4fe91d8eba4b1ce27060b4c601d … -
@jckarter That is wild. How is it that if x is a Derived and I do (x=>Base.f)() it ends up calling Derived.f()? -
@mjtsai Base.f doesn't pick a method implementation until you give it a `self` parameter. -
@jckarter Aha, I was used to the way Python does it. Good to know. Can you do that with an operator or only a named method? - View other replies
- Show more
-
-
-
@mjtsai Maybe convert your T? to a 0- or 1-element [T] and then just call the [T] code? -
@Callionica Not desirable in this case because then it wouldn’t look right when printing the value.
-
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.
Michael Tsai
Joe Groff
Callionica