Smashing Swift
nomothetis.svbtle.com
Smashing Swift
1–10 of 150 posts
Re: Smashing Swift
#2Now, not supporting functors is odd, though.
Re: Smashing Swift
#3Just to point out, the last two sound like it's due to the current implementation (compiler) being new, so it isn't so upsetting at all. Now, not supporting functors is odd, though.
Re: Smashing Swift
#4These rose-colored glasses are getting ridiculous.
Re: Smashing Swift
#5> I love what the compiler crashes let me hope it will do These rose-colored glasses are getting ridiculous.
Re: Smashing Swift
#6I have absolutely no experience on implementing compilers, but for a layman these inconsistencies seems very odd.
Re: Smashing Swift
#7> I love what the compiler crashes let me hope it will do These rose-colored glasses are getting ridiculous.
Re: Smashing Swift
#8My initial guess is that a functor is just sort of like a function that casts or does something like return an interface type from a type that implements the interface or a base class. Is that right? I still don't understand why an array is a functor though, I'd imagine it would at least have to be a function?
Edit:
Actually I think he's talking about Haskell's version of an iterable, and it would then make sense to call an array a functor.
https://en.wikibooks.org/wiki/Haskell/The_Functor_class
Why is that called a functor instead of an iterable or enumerable though?
Re: Smashing Swift
#9The primary vibe I'm getting from Swift is pragmatism. They had various red lines to follow: must be as fast as Objective C; must have a minimal to non-existent runtime (so AOT compilation all the way); mustn't have garbage collection, must interoperate with Objective C/normal C with ease; etc. This had led to a language which, despite being at version 0.1, has a fair few oddities and warts already. For example, the "almost but not quite immutable" arrays seem to be an artefact of absolutely wanting array performance to be equal to standard C. Typealiases vs parametric protocols seem to be a desire to have as much type information fixed as soon as possible.
It seems that rather than design a language where they might not have solutions for their red lines up front, they've designed a language where they can provide them. Rather than make theoretically "better" choices the compiler can't deliver perfectly in V1, but can in V4 or 5, they've gone for "yeah, we can almost certainly ship that". Given that this is essentially Apple's private language, I assume they'll be quite aggressive about deprecating features and moving people onto the "better" solutions (high-kinded types, richer immutability etc) when they can deliver them whilst meeting the core goals. It's an interesting approach - most other languages are happy to take a few years to get going, whereas Swift seems to want to go from 0 to 60 in 4 months. It reminds me most of C# 1.0, but with harder restrictions on what they've been told to deliver. At the moment, it's interesting, and a big leap from Objective C. By V3, it might be "excellent".
Re: Smashing Swift
#10> I love what the compiler crashes let me hope it will do These rose-colored glasses are getting ridiculous.
By my reading the author made that statement, not naively, but with full awareness of it's slightly ridiculous nature. I think that whooshing sound was their joke going right over your head.
It's possible, of course, that Apple will modify the grammar to make these use cases impossible. But I would be very surprised. I can't blame anyone for accusing me of rose-tinted glasses until we know for sure, though.