News for hackers. Stuff that matters.
Re:Chris Lattner on Swift by mikeash on Tuesday June 03, 2014 @04:58PM (#7842689)
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 have expected experienced programmers to have reached that point long ago.

Re:Chris Lattner on Swift by nostrademons on Tuesday June 03, 2014 @05:08PM (#7842730)
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"
Re:Chris Lattner on Swift by axman6 on Wednesday June 04, 2014 @02:05AM (#7844243)
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.
Re:Chris Lattner on Swift by melito on Tuesday June 03, 2014 @05:38PM (#7842891)
No different from learning a human language I think.

The first thing you're exposed to is its sounds and symbols.

They look & sound strange and your brain instinctively tries to make sense of them by comparing it to something you are already familiar with.

Then when you dig into it you begin learning vocabulary and grammar. You focus on that for a long time until the sounds sound less like gibberish and resemble something like what you've been practicing putting on paper.

Once you get comfortable with the constructs and stop focusing on them you can start conversing - putting more effort into what you're trying to say then how you would go about saying it.

After that then you can start picking up all the idioms, colloquialisms, cliches, double entendres, etc

Finally you can start inventing your own.

Re:Chris Lattner on Swift by jfb on Tuesday June 03, 2014 @07:03PM (#7843218)
Most of the commenting on a new language, particularly here (as opposed to on e.g. Lambda The Ultimate) is from people who aren't going to write a single line in it in anger; it's not surprising that idle commentary would focus on syntax. It's of a piece with all internet commentary, which rarely gets below the outermost layer of thinking about anything.
Re:Chris Lattner on Swift by mikeash on Tuesday June 03, 2014 @08:03PM (#7843395)
I've been seeing much the same from programmers invested in the Apple ecosystem who will likely be spending all day writing nothing but Swift within a year.
Re:Chris Lattner on Swift by austinz on Tuesday June 03, 2014 @08:33PM (#7843471)
Lots of people are having a hard time understanding the difference between dynamic typing and static typing with type inference.
Re:Chris Lattner on Swift by mikeash on Tuesday June 03, 2014 @08:53PM (#7843519)
Definitely. I suppose it's understandable if this is your first exposure to type inference. Superficially it looks exactly like the "assign anything to anything" languages like Python or JavaScript.