Difference between revisions of "Swift"

From Coder Merlin
m (Added access control under bullet points)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
See full list of [https://www.codermerlin.com/wiki/index.php/Programming_languages languages].
== What is Swift? ==
== What is Swift? ==
Swift is a programming language made for development on apple devices. Swift was created by Chris Lattner and started development in 2010. For programming on apple devices, swift is a great alternative to Objective C (Which most programmers hate).
Swift is a programming language made for development on Apple devices. Chris Lattner created Swift; he started developing it in 2010. For programming on Apple devices, Swift is a great alternative to Objective C (which most programmers hate).


* Protocol-oriented programming (Basically OOP)
* Protocol-oriented programming (basically object-oriented programming (OOP))
* Basic value types
* Basic value types
* Access control
* Access control
Line 11: Line 13:
     5. private
     5. private
* String support
* String support
     1. Being able to concatenate strings similar to python
     1. Being able to concatenate strings similar to Python


== Performance ==
== Performance ==
Swift runs significantly faster than Python, PHP, LUA(Nobody uses this), and Ruby but runs much slower than rust and C. This is pretty good for an object-oriented programming language.
Swift runs significantly faster than Python, PHP, LUA (nobody uses this), and Ruby; however, it runs much slower than rust and C. This is pretty good for an OOP language.


== Why swift? ==
== Why Swift? ==
* Swift is fast  
* Swift is fast  
* Swift can be used on IOS devices  
* Swift can be used on IOS devices  
Line 23: Line 25:
* Swift is common
* Swift is common


== External Links ==
== References ==
[https://github.com/frol/completely-unscientific-benchmarks Speed tests]
[https://github.com/frol/completely-unscientific-benchmarks Speed tests]



Latest revision as of 15:13, 18 August 2023

Within these castle walls be forged Mavens of Computer Science ...
— Merlin, The Coder

See full list of languages.

What is Swift?[edit]

Swift is a programming language made for development on Apple devices. Chris Lattner created Swift; he started developing it in 2010. For programming on Apple devices, Swift is a great alternative to Objective C (which most programmers hate).

  • Protocol-oriented programming (basically object-oriented programming (OOP))
  • Basic value types
  • Access control
   1. open
   2. public
   3. internal
   4. fileprivate
   5. private
  • String support
   1. Being able to concatenate strings similar to Python

Performance[edit]

Swift runs significantly faster than Python, PHP, LUA (nobody uses this), and Ruby; however, it runs much slower than rust and C. This is pretty good for an OOP language.

Why Swift?[edit]

  • Swift is fast
  • Swift can be used on IOS devices
  • Swift is object-oriented
  • Swift is modern
  • Swift is common

References[edit]

Speed tests

Apple's webpage

Wiki