• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Devaka Cooray
Saloon Keepers:
  • Ganesh Patekar
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
Bartenders:
  • Ron McLeod
  • Frits Walraven
  • Pete Letkeman

Kopec Swift: Seems very similar to Kotlin. What are key differences or strengths?  RSS feed

 
Ranch Hand
Posts: 112
3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kopec,

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?
 
author
Greenhorn
Posts: 6
5
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Ranch Hand
Posts: 112
3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!