Live data from Hacker News

Flappy Bird in Swift

github.com

31–40 of 126 posts

Re: Flappy Bird in Swift

#31
post #26
post #20

I just started exploring the Book: The Swift Programming Language by Apple Inc. Link: https://itunes.apple.com/us/book/the-swift-programming-langu... Hope it helps.

Can anybody put this book somewhere outside itunes? Thanks!

https://news.ycombinator.com/item?id=7835994

Re: Flappy Bird in Swift

#32

Swift looks fine, the only thing I don't like its that is for Apple only products... that kinda defeats the purpose of having a programming language.

You can write code for non-apple products, its just that the libraries are lacking. I don't see how this defeats "the purpose of a programming language".

Re: Flappy Bird in Swift

#33
This may be a stupid question but is the language in some way tailored to game programming? Apple's examples at WWDC were game companies, their coding demo was a game, and this is the first project I've seen written in it - and it's a game.

Re: Flappy Bird in Swift

#34

This may be a stupid question but is the language in some way tailored to game programming? Apple's examples at WWDC were game companies, their coding demo was a game, and this is the first project I've seen written in it - and it's a game.

Games make easy examples because you can do a simple render loop and input. Most people understand the concept of sprites and basic animation.

Apple's UI frameworks are all MVC based, which means multiple classes and apple specific UI terminology.

Re: Flappy Bird in Swift

#37
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.

That's always been the intuition. If swift maintains a distinct Objective-C style but with more approachable syntax, then that suggests the intuition is true.

Re: Flappy Bird in Swift

#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?

Re: Flappy Bird in Swift

#40

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.

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.

Post reply on HN