Hacker Newsnew | past | comments | ask | show | jobs | submit | kapuru's commentslogin

Honestly curious: What makes it such a fantastic language?


I think optionals are my favorite feature. That may be due to me coming from a Java background (which also has optionals since 8, but I feel it's rather clumsy compared to Swift and other modern native languages).

By doing optional chaining you can do something like: if let name = result.person?.firstName { ... } which only evaluates firstName if person is not nil, and then stores the result in name which is immutable.

It's easier to avoid mutable code in Swift than in many other languages. For this reason I would love to start working with Swift on the backend at some point in the future.

I like extensions, being able to extend any class I want by just typing it into any file I want. This helps with iterative development and trying something out.

Speaking of iteratively, if I want to try something quick, I can also drop down to a shell and start the Swift REPL to experiment.

I like how built-in functions like zip and mapValues are available, so it in some ways has a Pythonic feel. I like the syntax of building strings by just taking a variable name and going let s = "Hi there \(name)!".

There are lots of other things I enjoy, such as subscripts (see why here: https://docs.swift.org/swift-book/LanguageGuide/Subscripts.h...) and

Some things I would like to see improved is Xcode itself and also Swift's capabilities in the backend.


Thanks for the answer!

I've been waiting impatiently for a better Swift backend ecosystem, because I'd love to use it for web development as well.


I’m having a great time in Vapor 3.


Vapor is pretty amazing. Super fast and pretty fun to work with; also a very friendly community. Ray Wenderlich’s team as well as Paul Hudson also have some great books on server-side Swift for those looking to learn this stuff.


As a mainly C# developer, it seems we have a lot of features in common!


yeah, string interpolation is such a killer feature. I love using it in Python 3.6.


not parent, but features of Swift that I _really_ miss when working in other languages are:

- rich enums - (https://appventure.me/2015/10/17/advanced-practical-enum-exa...) Much of my code is now encapsulated in the enum, where it logically belongs, instead of distributed throughout some class that consumes the enum.

- highly expressive pattern matching - (https://appventure.me/2015/08/20/swift-pattern-matching-in-d...) Swift's pattern matching is especially powerful with a switch statement. I frequently bundle multiple values into a tuple and switch across them, which allows me to flatten many if-else pyramids, and makes control flow more obvious up front.

- Optional - (https://developer.apple.com/documentation/swift/optional)

- Protocol extensions - (https://docs.swift.org/swift-book/LanguageGuide/Extensions.h...) Other languages use things like abstract classes or traits to implement this behavior, but I find protocols to be much more composable.

- The standard library - Swift's standard library is really well thought out. Many standard types have been built on top of highly reusable (and easy to reason about) types or interfaces that provide enormous utility when I adopt them in my custom types. Examples of this are: Codable (https://developer.apple.com/documentation/foundation/archive...), Equatable and Hashable (https://developer.apple.com/documentation/swift/adopting_com...)

There's more than that, and Swift is definitely not without it's shortcomings, but those features have fundamentally changed how I reason about code. I frequently find myself wishing I could reach for similar tools in other languages.


I agree with that list and I’d also add value types in structs. Getting rid of all the shared state that objects and reference types add has been a big win for stability and correctness in my apps. I’m getting out of iOS development in favor of the web but I’ll miss swift.


To add to the other good answers here: I love its succinctness. The syntax itself is succinct (but still extremely readable) and the pervasive availability of functional-style methods (map/filter/reduce/etc) make it easier to keep lots of code in your head and on your screen at one time, making it much easier to understand complex code.


Not OP, but if you look at Rust, take out the borrow checker and you basically have Swift. It's a nice combination of modern OO and functional language constructs that make it easy to write elegant abstractions.


Python like


  Location: Berlin
  Remote: Yes
  Willing to relocate: Yes
  Technologies: PHP, Laravel, Golang, JavaScript, Node.JS, Postgres, Docker
  Résumé/CV: Upon request
  Email: cihan (at) tas.fm


Does the same thing apply to newsletters? Let's say I get a bunch of free newsletters to my inbox and share them on my website (I mean literally copy the body so people don't have to sign up for the newsletter themselves), does it count as copyright infringement?


Good work. I'm curious which API you use (or many different?), because in comparison to other plugins you even support newly listed airdrops.

Another question: Is there any good approach to monetize a chrome extension like this one?


Thanks!

Currently I'm using the API of CoinMarketCap, which supports over 1300 coins!

To your second question about monetizing. You can publish and sell your extensions aswell. In my opinions, this does not make sense as all, as there is a lot of competition and most of extensions are for free.

However, I'm not trying to make any profits with this Project. It was just for fun and wanted to contributed something to the community.


Sadly, no. I tried it out again a couple of days ago and the performance is still terrible. I'm in the same boat as you and switched to VS Code.


I hope xray[1] catches up. I prefer atom's UX-UI to any other editor but I agree that performance is still an issue. MS taking over Github doesn't seem to bring to a bright future. I really hope I'm wrong.

[1] https://github.com/atom/xray


With xray focusing away from improving the editor experience and more on this new version control thing [1] for now, it doesn't seem like we'll be seeing a GitHub-provided alternative to Atom for some time.

[1] https://github.com/atom/xray/blob/master/docs/updates/2018_0...


In an AMA the future CTO said they would never get into text editor politics by merging the two or taking one away. Both editors will remain.


I experienced this with so many potential "partners/co-founders". It almost always starts with an exciting discussions about the possibilities and how we're all going make s--tloads of money, but as soon as I expect them to commit to the repo they just can't deliver. Most of the times it's lack of skills, missing motivation, or just the fact that they can't work without being micro-managed by me.


I would love to use it, as I'm desperately looking for a partner for my site Unfollow.IO and another project since 2016, but I have no credit card. Would you accept PayPal?


Send a message to [email protected] and I'll help you with it!


Mail is out! Thank you. :-)


I need this. To bad it doesn't support deployments to packet.net.



This is probably one of the worst things that can happen to an exchange like Coinbase in moments like this and I expect this outage to cost them quite a few customers.


By the time this submission gets to the front page, Bitcoin Cash will be crashing again.


It’s funny that the crypto coins are so volatile that it’s almost impossible to write a standard article about them.


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

Search: