Its amusing to see Apple cheerleaders defend Swift as being good enough for version 0.1 when supposedly Apple is this company that only releases products when they're complete/polished/etc. Apple themselves proclaim its "Ready Today" on their marketing page as well. ( https://developer.apple.com/swift/ )
Smashing Swift
131–140 of 150 posts
Re: Smashing Swift
#132> I love what the compiler crashes let me hope it will do These rose-colored glasses are getting ridiculous.
I think the point here is that if the compiler crashes, that implies that it is trying to do the thing, as opposed to saying "No, filthy programmer, I will not permit you to do that thing."
Re: Smashing Swift
#133"She" the programmer. Seriously this sounds ridiculous and is the outcome of the shameful male "betafication" women try to establish these days. I say "he" the programmer. Okay enugh bullshit and to the point: Swift is preview. It will get better and better fromday to day. It isn't there to mimic scala or lisp paradigms. It is there to get the job done and it will get the job done.
Well, aren't you wonderful? Why, you'll probably win the Nobel Prize for Protecting the Poor Oppressed Men!
Alternating he and she for an abstract person is quite common amongst people who don't use singular they.
Re: Smashing Swift
#134Earlier quoted context omitted.
To be fair, reference counting isn't strictly deterministic either. The moment you mix in multithreading or call out to code you don't control and whose refcounting behavior could change over time, you can no longer know when an object will die. As for memory pressure, reference counting does generally behave better, but in some situations you can end up doing much worse. If you manage to generate a lot of autoreleas…
I'm not very familiar with the implementation of programming languages, so maybe the terminology is subtly different, but how are either of those situations not deterministic?
Re: Smashing Swift
#135Earlier quoted context omitted.
As a fairly inexperienced programmer, can someone please explain why everyone is so happy there is no garbage collection going on? Shouldn't that be something we would want? (Is it because control over this allows us to do extra things?)
There's a helpful bit of writing about garbage collection on http://sealedabstract.com/rants/why-mobile-web-apps-are-slow... It boils down to there being a big performance penalty on garbage collection in memory-constrained environments.
Re: Smashing Swift
#136I successfully got the Functor example to work like this: protocol Functor { typealias T typealias FunctorResult func map (mappingFunction: T -> P) -> FunctorResult } extension Dictionary : Functor { func map (mappingFunction: ValueType -> P) -> Dictionary { var newDict:Dictionary = [:] for (key, value) in self { newDict[key] = mappingFunction(value) } return newDict } }
That doesn't actually work, because you're limiting the return type of the method in the implementation of the functor. So by implementing that protocol, you could have one mapping from Int to String (say), but not another from Int to Double. Put another way, you need to specify FunctorResult at implementation time, and the whole point is to only have to specify it at call time.
let d = [1: 1, 2: 2, 3: 3]
let intToInt = d.map { $0 + 1 }
var IntToString = d.map { String($0) }Re: Smashing Swift
#137Earlier quoted context omitted.
> meaning that level of support for the platform's native GUI with that performance and elegance. Seems like that criteria would bias the choice of most innovative language quite heavily towards languages developed for/by Apple, no?
Wow, when I went to bed this comment was at 2 karma. Now it is at a negative (-3) and so are all the comments in this chain of replies that was critical of Apple's product, when before they were not greyed out. Fancy that. :)
Re: Smashing Swift
#138"She" the programmer. Seriously this sounds ridiculous and is the outcome of the shameful male "betafication" women try to establish these days. I say "he" the programmer. Okay enugh bullshit and to the point: Swift is preview. It will get better and better fromday to day. It isn't there to mimic scala or lisp paradigms. It is there to get the job done and it will get the job done.
> I say "he" the programmer. Well, aren't you wonderful? Why, you'll probably win the Nobel Prize for Protecting the Poor Oppressed Men! Alternating he and she for an abstract person is quite common amongst people who don't use singular they.
For those wondering about the weird "betafication" thing, I recommend reading this fine blog: http://wehuntedthemammoth.com/
It's a trope of the self-anointed "men's rights" crowd, from people who are in a continual hysteria about how society is stopping them from being proper alpha males. Never quite getting that passive-aggressive anonymous-coward Internet message board comments are not how chimpanzee males work out their dominance issues.
Re: Smashing Swift
#139Earlier quoted context omitted.
To be fair, reference counting isn't strictly deterministic either. The moment you mix in multithreading or call out to code you don't control and whose refcounting behavior could change over time, you can no longer know when an object will die. As for memory pressure, reference counting does generally behave better, but in some situations you can end up doing much worse. If you manage to generate a lot of autoreleas…
I'm not very familiar with the implementation of programming languages, so maybe the terminology is subtly different, but how are either of those situations not deterministic?
Re: Smashing Swift
#140Earlier quoted context omitted.
Just to be clear: innovative for Apple development community or innovative generally? Please list some/all innovations, I would be happy to reconsider.
Apple GUI development is obviously a major constraint. Another is: no GC in order to avoid the collections happening when they want and thus making the smoothness of the UI impossible. I still claim there isn't at this moment any more innovative language that can provide that what Swift provides, observing any GUI platform you want to observe: meaning that level of support for the platform's native GUI with that perf…