Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I think it's because Swift is so new only a small percentage of people have actually looked at the language spec.

First thing I thought of when I saw all the func calls, curly braces and beaks (->) was "this looks like in between Lua and Go"

After starting to dig into the book, it's pretty apparent that isn't the case



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.


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.


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.


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.


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.


Lots of people are having a hard time understanding the difference between dynamic typing and static typing with type inference.


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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: