Re:Swift, the new way to build iOS Apps. Here's how
by joeblau on Tuesday June 03, 2014 @08:47AM
(#7839760)
I think the problem is with the boilerplate of objective-c. I tried to make something last night and I'll be honest, I felt like I was in Go or Scala (functional) more than I was in a C-ish style language. I'm not gonna lie, I was looking at some of the docs with a "WTF" look, but I'm a big proponent of functional programming. In the few instances that I've used it, my code has been very concise, but not always easily readable.
[ Parent
| on HN ]
Re:Swift, the new way to build iOS Apps. Here's how
by rubiquity on Tuesday June 03, 2014 @09:15AM
(#7839939)
What features of Swift do you find functional? What kind of functional features are you using? I'm asking out of genuine curiosity, not to put you on the spot. Thanks!
Re:Swift, the new way to build iOS Apps. Here's how
by bitpew on Tuesday June 03, 2014 @09:41AM
(#7840093)
Not to speak for the OP, but two features bear resemblance to functional programming languages:
1) Function Types ( = higher order functions)
This allows functions to be passed around as function parameters or return values.
2) Immutable variables via let
let a = 1 // a is always bound to the constant 1
a = 2 // error
[deleted]
Re:Swift, the new way to build iOS Apps. Here's how
by ktran03 on Tuesday June 03, 2014 @10:25AM
(#7840356)
“The value of a constant doesn’t need to be known at compile time, but you must assign it a value exactly once.”
Excerpt From: Inc, Apple. “The Swift Programming Language.” Apple Inc.
Check out this book on the iBooks Store: https://itunes.apple.com/WebObjects/MZStore.woa/wa/viewBook?...
Re:Swift, the new way to build iOS Apps. Here's how
by rubiquity on Tuesday June 03, 2014 @10:37AM
(#7840433)
Thanks for clearing that up. I misread the example in the Swift Programming Language reference.