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

Side note: I recently ported all of Plug to Swift (dev build, not yet released of course). Swift is a great leap forward!


The app looks awesome, and also served as my introduction to Hype Machine. How I haven't managed to hear of this service before is beyond me. Now I'm just sad I didn't know it existed until now.

Also great to hear that Swift development is going smoothly. I just started into learning it, and so far the strangest thing I've found is that I've learned a ton of Objective C by having to struggle through missing documentation/examples and having to learn the Obj C way of doing things and then translating them to Swift. It's been interesting.


Any observations?


Optionals are really interesting. In theory it's a really smart concept. In practice it seems to add a bit of complexity. Will be interesting to see if the concept pays off in the long term.


I'm intrigued by optionals, but I feel like returning nil for objects in ObjC - a pattern I've always used - is kind of the same thing in a different like. Do you have experience with returning nil instead of objects? How does that compare to optionals?


Yes, i did use that same pattern. And if you want to, you can kind of force Swift to do this (String! is an "unwrapped optional" and can be nil or have a value) but it feels unnatural. You definitely have to design a bit differently than ObjC. Luckily Swift's enums are amazing and you can return multiple values (through tuples), so there are great ways to return different types of values.




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

Search: