Live data from Hacker News

The Swift Programming Language

developer.apple.com

571–580 of 970 posts

Re: The Swift Programming Language

#571
post #560

Earlier quoted context omitted.

My dislike is that it uses [] for method calls. It's like making Objective-English where we swap Z and A and j for o, just for the hell of it. If thzt sjunds like fun tj yju, thzn gj fjr Jboective-C.

It's not for the hell of it. [ ] does not mean method call, it is the syntax for a message send. Objective-C is a super set of C, adding an Smalltalk like object system to C. The delimiters say "I am sending a message", which is different to a method call. Also, without them the language would be much more difficult to parse, and future changes to C could break the language. It's lasted well (first appeared in 1993).…

> It's lasted well (first appeared in 1993).

1983, actually.

Re: The Swift Programming Language

#572
So, I picked up Objective-C a few weeks ago, and I've been struggling (only coming from a Python background, with only the CS-knowledge I've picked up along the way). I just figured it would be fun to be able to make some apps. What would your advice be? Stick with Objective C, or switch over to learning Swift? Swift looks a lot more friendly, but I don't want to sell myself short. I'm also thinking big picture, where learning Obj-C might eventually be helpful in learning other languages.

Re: The Swift Programming Language

#574

You appear to be advocating a new: [ ] functional [X] imperative [X] object-oriented [X] procedural [X] stack-based [ ] "multi-paradigm" [ ] lazy [ ] eager [X] statically-typed [ ] dynamically-typed [ ] pure [X] impure [ ] non-hygienic [ ] visual [ ] beginner-friendly [ ] non-programmer-friendly [ ] completely incomprehensible programming language. Your language will not work. Here is why it will not work. You appear…

In addition to being a space-hogging recapitulation of an old, boring Usenet joke, a lot of your checks are wrong; some of them are because the Usenet joke is lame, but some of them are just you missing things, like the fact that Swift interacts directly with C/ObjC, uses the same IDE as Cocoa developers already use, &c. This lame Usenet joke was a way of punching down at people joining language newsgroups trying to…

I posted the checklist partly in jest, but also because I think it illustrates how every programming language ends up stuck with the same trade-offs.

Re: The Swift Programming Language

#575

Earlier quoted context omitted.

It's not hate, but Objective-C can be intimidating.

I just spent the past 2 months learning obj-c, about to release my first app and boom, X out obj-c. my luck.

You'll always be able to contribute to NeXTSTEP. It's not dead yet!

Re: The Swift Programming Language

#576

Earlier quoted context omitted.

I'm not really that impressed--it looks like a hodgepodge of ideas from ES6, Ruby, Go, and maybe Rust, with a bit of backend work done to let it work on their existing infrastructure. I dislike that Apple has continued the special snowflake approach, that for some reason we as developers need to learn yet another different-but-almost-the-same language to develop for them, instead of just adding proper support and doc…

Agreed that the lack of using an existing (and open-source!) language is annoying and frustrating to deal with (think of where we'd be if they invested that time and effort into improving Ruby/Python/whatever instead!). But because of the desire for compatibility with Objective-C, and Apple's general desire to call all the shots regarding their ecosystem, this move doesn't surprise me in the least.

Apple consistently represents a step backwards for both developers and users, in terms of engineering and freedom, but they've amassed enough capital at this point that the hope of them simply withering on the vine and dying off is probably not going to happen.

At least Microsoft and Google show off their new projects and code so everyone can learn from them and read their research.

Re: The Swift Programming Language

#577
Looks neat, but I'm disappointed that Apple didn't go with Ruby for their next-generation language. Things like MacRuby and Ruby Motion make it seem like that was a possibility, albeit a pretty distant one.

Re: The Swift Programming Language

#578
post #547

Earlier quoted context omitted.

From a user's point of view, it's basically straight out of the Rust book, all the gravy with also relaxed ownership and syntax. It has it all [1]: static typing, type inference, explicit mutability, closures, pattern matching, optionals (with own syntax! also "any"), generics, interfaces, weak ownership, tuples, plus other nifty things like shorthand syntax, final and explicit override... It screams "modern!", has a…

Indeed, I'm not sure what Swift's concurrency story is yet. Other than that it's encouragingly similar to Rust (we're evolving in the right direction!), but not quite as low-level.

I'm sure that the main mechanism will be the existing dispatch queue libraries Apple's other languages use.

Re: The Swift Programming Language

#579

I really wish we could play with it, without having to be a paid member. It's crazy how Apple is always so scared to release dev tools, at the end it will be out-there on bittorrent anyway...

Visual Studio isn't free in that regard either. What exactly are you comparing this release to?

Re: The Swift Programming Language

#580

Earlier quoted context omitted.

In addition to being a space-hogging recapitulation of an old, boring Usenet joke, a lot of your checks are wrong; some of them are because the Usenet joke is lame, but some of them are just you missing things, like the fact that Swift interacts directly with C/ObjC, uses the same IDE as Cocoa developers already use, &c. This lame Usenet joke was a way of punching down at people joining language newsgroups trying to…

I posted the checklist partly in jest, but also because I think it illustrates how every programming language ends up stuck with the same trade-offs.

It really doesn't work here, but also, while I appreciate the spirit you pasted it in, that wasn't the spirit it was written in. (And it takes up a huge amount of space).
Post reply on HN