Win a copy of Transfer Learning for Natural Language Processing (MEAP) this week in the Artificial Intelligence and Machine Learning forum!
  • 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
  • Tim Cooke
  • Paul Clapham
  • Devaka Cooray
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Knute Snortum
  • Liutauras Vilda
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Piet Souris
Bartenders:
  • salvin francis
  • Carey Brown
  • Frits Walraven

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

 
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
Posts: 15
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.
 
A timing clock, fuse wire, high explosives and a tiny ad:
ScroogeXHTML 8.7 - RTF to HTML5 and XHTML converter
https://coderanch.com/t/730700/ScroogeXHTML-RTF-HTML-XHTML-converter
    Bookmark Topic Watch Topic
  • New Topic