@brentsimmons EmailMessage is a NodeRepresentedObject, but [EmailMessage] is not a [NodeRepresentedObject].
-
-
-
@brentsimmons More generally, the in-memory representations of NodeRepresentedObject and EmailMessage differ, so conversion is required. - View other replies
-
@eridius Nevertheless, I want this to work. It seems obvious that it should work, and I don’t see a downside. - View other replies
-
@brentsimmons If it did work, then you can accidentally get O(N) performance in code that you thought was O(1).
-
-
-
Hey you guys I heard
@brentsimmons is working on an email client -
@davecporter@brentsimmons Give him another couple of blog posts - he'll change his mind... -
@ajsutton@davecporter Sometimes I think it’s great how willing I am to change my mind in public. And then later I think it’s dumb. -
@brentsimmons@davecporter My theory: always work somewhere that makes you feel stupid. For you that seems to be the internet. -
@brentsimmons@davecporter The basis being that you have the most to learn when you feel stupid (not to work in abusive environments).
-
-
-
@brentsimmons protocols aren't types which I think is the crux of your problem; use classes instead: https://gist.github.com/owensd/c00ecc4f4bf307f8e2db …. - View other replies
-
@brentsimmons@owensd Protocols are definitely types: https://gist.github.com/kylesluder/6959caadcacca4921d0d … -
@optshiftk@brentsimmons sure, but they aren't usable like types:https://twitter.com/jckarter/status/623242439982092288 … -
@owensd@brentsimmons “Protocols with Self requirements are not usable in all Type contexts” is different from “Protocols aren’t types.” -
@optshiftk@brentsimmons I only have 140 characters; protocols are a kind of type, but they are not usable like a type. That better? -
@optshiftk@brentsimmons also, Self requirements aren't the only limitation, just another example of their limitations as a type.
-
-
-
@brentsimmons Generics to the .… ok, to some form of rescue: https://gist.github.com/ttepasse/5fe8ee3a7fa765277faf … - View other replies
-
@ttepasse@brentsimmons The fully generic approach might be the least painful route though.
-
-
@brentsimmons Also, you can write the solution simpler as `return messages.map({$0})` -
-
@brentsimmons In this case, would it make sense instead to say “typealias Child; var children: [Children]” ? -
@jtbandes@brentsimmons I've never found a satisfactory solution to this either. I have similar problem in a Swift 1.2 app. -
@jtbandes@brentsimmons how can parent class (or protocol) have a generic collection and then children (or extensions) specialize it nicely? - View other replies
-
@jtbandes@brentsimmons I should re-watch protocol oriented programming talk then get into a sweat lodge and solve this.
-
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.
Brent Simmons
Kevin Ballard
Dave
Adrian Sutton
David Owens II
Kyle S.
ttepasse
Joe Groff
Jacob Bandes-Storch
Jacob Schwartz