Having written a bit of Kotlin and having reviewed a bit of Swift it seems there are similarities in the two languages. From a few "Talking Kotlin" podcasts I remember hearing that the language designers of Kotlin took a lot of inspiration from Swift. Do you have familiarity with both languages and if so do you think they are similar? What are some of the key differences in your mind?
If you don't have experience with Kotlin could you mention some of the key strengths of Swift?
Sorry, I don't have enough familiarity with Kotlin to intelligently answer this question. As far as Swift goes, it has many strengths, some of which include:
- an emphasis on safety: stringently type checked code, optionals instead of null-pointer exceptions, and extensive syntax for working with optionals
- progressive disclosure: easy to get started with but featureful (you don't need to use every feature at first)
- protocol-oriented programming: a style that focuses on composition, giving protocols first-class status
- multiparadigm: can be programming in a procedural, object-oriented, functional, or protocol-oriented style
- modern syntax: this is especially true for people transitioning to Swift from Objective-C
- great learning environment in the form of Playgrounds in Xcode on the Mac and the Playgrounds app for iPad for younger kids
There are more but these are probably the main attractions for people learning the language (besides wanting to make iOS or Mac apps of course!).
Kent O. Johnson
posted 7 months ago
Progressive disclosure sounds interesting. I'd like to see how a language does that. The protocol idea seemed compelling as well. I tried a bit with the Playground and will give it another go as I read your book.
She still doesn't approve of my superhero lifestyle. Or this shameless plug:
Programmatically Create PDF Using Free Spire.PDF with Java