So Swift has been out awhile, what do people think of it? What other language would you compare it to (e.g. C#, C, C++, etc)? What about the libraries are they well laid out?
For people coming from C/C++/ObjC, some things in Swift can take some time to get used to, e.g. if case .Success(let person) = personResult { ... } My first thought when I saw this was, "only mother could love this syntax", but later you come to appreciate and enjoy the syntax. Link: https://www.natashatherobot.com/swift-guard-better-than-if/
Swift Programming Language Evolution
121–130 of 181 posts
Re: Swift Programming Language Evolution
#122I've never understood the fascination with Swift. What's wrong with Objective C?
Objective-C has no safe collections for non-object values. If you want an array of ints, for example, you either get to use a C array with lots of manual management and potential for error, or you use an NSArray of NSNumbers and pay for a bunch of overhead. It has very poor support for custom value types. Objective-C structs basically can't contain object pointers, so they're limited to simple things like CGRect. The…
Re: Swift Programming Language Evolution
#123Earlier quoted context omitted.
There have been 30% stock price drops multiple times during the 13 years of continuous growth. They are clearly not correlated with the actual growth prospects, and if the stock market actually thought that Apple was dropping like a rock as you claim, you would expect to see a far higher discounting. You mention the Mac, which as declined in absolute terms but has continued to grow relative to the declining market. T…
I apologize, as I seem to be failing to convey my message to you. My assertion: Apple is dropping. Be careful about investing in Apple-only techs like Swift. Your argument (I think): Apple is not dropping like a rock. To support your argument, please provide a sources for the following: - The last time Apple stock was down 30% from same day prior year. - iPhone sales are not dropping > 10% (hence 'like a rock') . - M…
Re: Swift Programming Language Evolution
#124Does "will be portable" include any notion of a cross-platform UI?
Re: Swift Programming Language Evolution
#125Swift is great language and an enormous leap forward in the apple-sphere. I'd like to see a bigger investment in JavaScript everywhere. I'd like to see apple make a push to allow writing 100% javascript apps for iOS and mac. I think it could be a huge differentiator for iOS and Mac development and it would bring to Apple the largest developer base out there.
Re: Swift Programming Language Evolution
#126Submitters: Please don't rewrite titles to say what you think is important about an article. Cherry-picking a single detail is a form of editorializing, which HN doesn't allow in story titles. The guidelines ask you to change titles only when they're misleading or linkbait, which wasn't the case here. If you think one detail is most important, you're welcome to comment on that in the thread. Then your opinion is on t…
Re: Swift Programming Language Evolution
#127Re: Swift Programming Language Evolution
#128Earlier quoted context omitted.
I gotta disagree with this one. Those operators have always been confusing and unnecessary. j = i++ being different from j = ++i alone is enough to convince me it's gotta go.
Exactly. I am disappointed they're removing function currying/partial application syntax though :(
Re: Swift Programming Language Evolution
#129So Swift has been out awhile, what do people think of it? What other language would you compare it to (e.g. C#, C, C++, etc)? What about the libraries are they well laid out?
Semantically, it's probably closest to Rust (from my limited exposure). The syntax is slightly changed, but most things have a direct parallel between the two languages. Although Swift doesn't do ownership/borrow checking like Rust does and is a lot more relaxed in that department.
Re: Swift Programming Language Evolution
#130Earlier quoted context omitted.
How are generics 'fuzzy at best'? I can understand why you could think that associated types in protocols can be a pain in the ass, but there are reasons why its done this way.
Sorry was generalizing. I meant generics and protocols in combination. The ability to define a protocol based on a generic would be fantastic. It's something that is solved in Haskell fairly well.