Live data from Hacker News

Chris Lattner on Swift

nondot.org

121–130 of 203 posts

Re: Chris Lattner on Swift

#121
post #116

Earlier quoted context omitted.

C++ can be just fine. It can also be used to write software bad enough to quit over, that dozens of people will maintain for decades. And they talk about it. I don't think Objective C has that problem.

To be fair, Objective C hasn't run billion dollar companies for decades yet either (in mass).

Yes, that is my point but I didn't make it very well. If Objective C were routinely subjected to these sorts of projects, I think its over-all reputation would be a lot worse.

Re: Chris Lattner on Swift

#122
post #90

Earlier quoted context omitted.

Is Objective C really that much better? If you have decent APIs/libraries, C++ would be just fine.

As an example, OKCupid uses C++ and runs on a custom webserver. http://www.okcupid.com/about/technology

I don't understand. Why would you make everything in-house especially for site like Ok-Cupid which is not exactly used to power rocket engines.

Re: Chris Lattner on Swift

#123
post #9

Really excited for Swift. I've tried and failed many times to learn Objective C and felt that the barrier to entry was a bit to high for myself. As a someone who writes JavaScript for a living, Swift is very inviting.

Programming languages are like vehicles. If you can drive one, you mostly know how to drive the other. JavaScript has a lot more gotchas than Objective-C. If you feel comfortable with the weird "this", closures, and prototypes, Objective C shouldn't be hard. Pick up a copy of K&R to get familiar with C and then read the Objective-C docs.

Re: Chris Lattner on Swift

#124
post #9

Really excited for Swift. I've tried and failed many times to learn Objective C and felt that the barrier to entry was a bit to high for myself. As a someone who writes JavaScript for a living, Swift is very inviting.

Not trying to be rude, but if you've tried and actually FAILED to learn Objective-C multiple times, then you will have a much bigger problem with actually learning the Cocoa framework yourself. Objective-C does have a non-standard syntax, but its barrier of entry for actual learning is purely psychological and not technical.

My problem with "learning Objective-C" was always the frameworks, not so much the language itself.

Re: Chris Lattner on Swift

#125

I like Chris and what he has done, but... >>The Swift language is the product of tireless effort from a team of language experts, documentation gurus, compiler optimization ninjas... Seriously? What is a "documentation guru"? What is a "compiler optimization ninja"? I find language like this so distracting and asinine that I had to stop reading. Am I the only one?

Well, regarding "what is a documentation guru?", the documentation system for Swift is extremely impressive; all example pages are literate programs which can be interacted with with live results a la the playground. That's some bad ass documentation if you ask me.

Re: Chris Lattner on Swift

#126
post #26

Funny how he forgot to mention Golang somehow while that seems to be one of the bigger inspirations for the language.

I don't understand why people keep comparing Swift and Go, as they have diametrically opposed philosophies. As stated succinctly by Bryan O'Sullivan (one of the most prominent people in the Haskell community) on Twitter: "It's interesting to compare Swift and Go. One has caught up to the 1990s in language design, with the other firmly in the 60s." Swift includes many of the language features that have been touted by…

The concurrency problem was partially and briefly covered in the Platforms state of the Union keynote. Since closures in Swift are compatible with Apple's C blocks extension, all of the libdispatch API works with it out of the box. and the last-argument-is-a-closure syntax from Ruby makes it really nice:

    dispatch_apply(arr.length, queue) {index in
        arr[index] = expensive_func(arr[index])
    }
Obviously nice wrappers can be written around code like this to give you safe parallel programming. You could also quite easily make futures/async stuff.

Re: Chris Lattner on Swift

#127
post #90
post #78

Earlier quoted context omitted.

C++ would be absolutely terrible for social media applications. There, the barrier isn't usually the speed but correctness and maintenance overhead.

Is Objective C really that much better? If you have decent APIs/libraries, C++ would be just fine.

No, objC isn't better. While it is fine for UI stuff, I wouldn't really want I build a web app with it. What I've read of Swift is more interesting.

Re: Chris Lattner on Swift

#128

Earlier quoted context omitted.

> 99% of the articles about the profound importance of generics are people building nothing of interest for anyone, and it is exactly that vaguery of design that makes generics seem so important. I think it's quite a stretch to say that people who have written articles about generics are almost never building anything of importance. The browser you used to post this comment makes extensive use of generics via C++ tem…

I think it's quite a stretch to say that people who have written articles about generics I said 99%. The vast majority of language observations online are language tourists, and the observations are seldom practical or rational, but instead are of the "in kicking the tires and making nothing in practical, here are my thoughts". Those sorts of posts dominate. Generics have a place, but their importance is...overstated…

People don't write articles discussing how their whole complex project works because it would take too long. those articles are written to highlight what and how these features have improved their ability to make software efficiently/reduce errors etc.

I do not agree that the importance of generics is overrated and it's one of the primary reasons I won't be using Go. I need to know what type of object I'm working with to feel comfortable when programming, and I like the reassurance from the compiler that it agrees with me that that is actually what I'm working with. I would really like Go if it had generics, but it's just too unsafe for me to use in its current form.

Re: Chris Lattner on Swift

#129
post #85
post #3

It's amazing that Apple managed to go from hatching the idea in mid-2010 to releasing a fully working framework 4 years later, with tight IDE integration, huge amount of testing and compatibility without a single leak (that I've heard of).

Doesn't it use the same frameworks as Objective-C?

It does (direct interop with ObjC was obviously a design constraint; just look at function signatures), but there was still a tremendous amount of work to make a language one guy started on in 2010 into a beta today.

Re: Chris Lattner on Swift

#130
post #47

Earlier quoted context omitted.

It's bizarre how focused programmers are on syntax. It seems like half the comments about Swift have been comparing it to languages which it superficially resembles at the syntax level. And the other half of the comments are along the lines of, "I can't stand Objective-C's brackets, this looks much better." It's like that scene from The Matrix: "I don't even see the code. All I see is blonde, brunette, red-head." I'd…

Wadler's Law: "In any language design, the total time spent discussing a feature in this list is proportional to two raised to the power of its position: 0. Semantics 1. Syntax 2. Lexical syntax 3. Lexical syntax of comments"

Speaking of which, I was quite pleased to see the inclusion of nested comments. Makes getting rid of currently incorrect code during development much easier.
Post reply on HN