Live data from Hacker News

Flappy Bird in Swift

github.com

41–50 of 126 posts

Re: Flappy Bird in Swift

#41
post #38
post #5

I got mixed feelings about the language at first sight. I guess my mammalian brain recognizes languages based on the particular combination of the following naming decisions. * func, function, fun, defun fu, funct * CamelCase vs snake_case * whitespace, semicolon or comma usage * var, int/integer/uint64/Integer/ * choice of (), {}, [] or better (){a[]} * import/include/require, class/class, override, self vs this, ne…

> PS: next time you design a new language just make a random unique combination of the above. That's my impression whenever I see a new programming language too. Why would someone switch to your language if the syntax is just the same boring old syntax they've been using in another language?

Because in this case, it's an alternative to a language (Objective C) with a not so boring esoteric syntax.

Re: Flappy Bird in Swift

#42
post #38
post #5

I got mixed feelings about the language at first sight. I guess my mammalian brain recognizes languages based on the particular combination of the following naming decisions. * func, function, fun, defun fu, funct * CamelCase vs snake_case * whitespace, semicolon or comma usage * var, int/integer/uint64/Integer/ * choice of (), {}, [] or better (){a[]} * import/include/require, class/class, override, self vs this, ne…

> PS: next time you design a new language just make a random unique combination of the above. That's my impression whenever I see a new programming language too. Why would someone switch to your language if the syntax is just the same boring old syntax they've been using in another language?

It would be pretty weird to base language switching decision on syntax similarity.

Re: Flappy Bird in Swift

#43
post #28

This being the only code sample of swift I've seen, my overriding takeaway is that for the basic stuff it's remarkably similar to Objective-C with a lick of paint. If people really take to swift, it'll be interesting to see if that's because it creates a shift in programming style, or because people really are just afraid of small syntactical differences.

Readability matters - maybe the Objective-C verbiage melts away once you're up to speed, but it certainly puts you off wanting to get there.

I find obj-c super readable, other people don't? I mean, take two hours to get used to the bracket syntax for message sending and it's super readable although a bit verbose?

Re: Flappy Bird in Swift

#44
I am really intrigued by the obj-c interop capability of swift, namely interactions between blocks and closures / anonymous functions.

I can see my AFNetworking code becoming much, much more readable now, without the need to @weakify/@strongify self on both sides of the block, but just add a blanket '[unowned self] in' inside the closure.

Re: Flappy Bird in Swift

#45
post #36
post #35

Earlier quoted context omitted.

Copyright...

Is it really copyrighted though?

yes. IANAL but... copyright law in the US is such that, in essence, everything is copyrighted (to some degree) the moment it is created unless you explicitly state otherwise.

When dealing with anything legally distributed / created in the US there are many questions, but "is it copywritten" should be one of the last ones, because the answer is always YES.

Re: Flappy Bird in Swift

#46

Swift is a new programming language. Does this implementation also use Metal? What is the Scene Kit relation to Metal?

SpriteKit and SceneKit is targeting casual games. Metal is an API that is close to GPU and is meant to replace OpenGL for console level games.

Re: Flappy Bird in Swift

#47

Earlier quoted context omitted.

Swift is definitely more approachable than Objective-C for new developers. I would imagine that is very on the reasons for creating it.

For new developers, or for developers coming from other languages? I think a lot of the trouble people have with starting to develop apps for Apple platforms actually comes from trying to figure out the APIs and style, while at the same time battling against unfamiliar syntax. From the little I've seen, Swift doesn't change the first part of that very much.

Both. The APIs and style sure are issues.

But there are plenty of language constructs which exist only in Objective-C.

Re: Flappy Bird in Swift

#49
post #43
post #28

Earlier quoted context omitted.

Readability matters - maybe the Objective-C verbiage melts away once you're up to speed, but it certainly puts you off wanting to get there.

I find obj-c super readable, other people don't? I mean, take two hours to get used to the bracket syntax for message sending and it's super readable although a bit verbose?

Same here.

All you have to do is get over named parameters, square bracket message passing, and overall verbosity, and you know enough to read/understand Objective-C code.

If you can get past those three differences, Objective-C is remarkably similar to Java and other OOP languages.

Personally, I love the verbosity. The code pretty much just explains itself.

Swift is a welcomed change though. I'm very optimistic and excited about the future of iOS going forward.

Post reply on HN