Live data from Hacker News

Swift Programming Language Evolution

github.com

121–130 of 181 posts

Re: Swift Programming Language Evolution

#121
post #84

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/

I've used ObjC since NeXTSTEP 3.3, and I'm trying to work with Swift. At this point, I've classified it in the same vein as Transact-SQL, a language I need to learn and use, but one I will not love. I guess I love the selector syntax too much. Shame that F-Script never caught on.

Re: Swift Programming Language Evolution

#122
post #51
post #27

I'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…

[deleted]

Re: Swift Programming Language Evolution

#123
post #117
post #108

Earlier 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…

You are failing to convey bullshit that's all.

Re: Swift Programming Language Evolution

#125

Swift 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.

I will be happy without that "largest developer base" brought to iOS. Anyone whos thinks Javascript it the best language ever deserves to keep programming in it.

Re: Swift Programming Language Evolution

#126
post #103

Submitters: 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…

Agreed. Please, don't let HN become Reddit.

Re: Swift Programming Language Evolution

#128
post #64
post #49

Earlier 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 :(

The currying was cool. I had to read the pull requests on that one and it seems that it was removed because it complicated language development. I'm hoping they bring it back in a modified more extensible way!

Re: Swift Programming Language Evolution

#129
post #55

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?

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.

Apple actually directly cites Rust as inspiration for Swift.

Re: Swift Programming Language Evolution

#130

Earlier 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.

Isn't that somewhat possible with extensions and constraints? At least that was the impression given by last year's WWDC talk [1], unless you're thinking of something else?

[1]: https://developer.apple.com/videos/play/wwdc2015/408/

Post reply on HN