티스토리 뷰

iOS-Development

Swift : 개요

Gobans 2022. 3. 8. 21:02

Swift


ios와 os x 프로그래밍을 위해 개발한 프로그래밍 언어

 

 기존 Objective-C의 단점을 보완하고, LLVM/Clang 컴파일러로 빌드되는 애플의 신규 프로그래밍 언어이다. 기존 Objective-C에 비해 클로저, 다중 리턴 타입, 네임스페이스, 제네릭, 타입 인터페이스 등 Objective-C에는 없었던 현대 프로그래밍 언어가 갖고 있는 기능을 많이 포함시켰으며, 이에 따라 일정한 성능 향상을 보이고 있다. iOS와 iPadOS, macOS를 대상으로 한다.

 

(*Objective-C의 단점: 언어 자체가 복잡하고 문법이 길다. Swift는 다양한 문법 체계를 제공하고 많은 라이브러리를 제공하고 있다)

 


Swift의 3가지 모토

 

Safe. The most obvious way to write code should also behave in a safe manner. Undefined behavior is the enemy of safety, and developer mistakes should be caught before software is in production. Opting for safety sometimes means Swift will feel strict, but we believe that clarity saves time in the long run.

Fast. Swift is intended as a replacement for C-based languages (C, C++, and Objective-C). As such, Swift must be comparable to those languages in performance for most tasks. Performance must also be predictable and consistent, not just fast in short bursts that require clean-up later. There are lots of languages with novel features — being fast is rare.

Expressive. Swift benefits from decades of advancement in computer science to offer syntax that is a joy to use, with modern features developers expect. But Swift is never done. We will monitor language advancements and embrace what works, continually evolving to make Swift even better.

 

(https://www.swift.org/about/)

 

 

안전성: 엄격한 문법으로 코드를 작성하게 합니다.

빠름: C-based languages (C, C++, Objective-C) 를 대체하기위한 목적이기 때문에 이러한 언어들 만큼 퍼포먼스가 빠릅니다.

표현성: 컴퓨터 과학과 함께 발전한 프로그래밍 언어들을 참고해 현대적이고 세련된 문법을 구현합니다. 그리고 지속적으로 업데이트 하여 더 좋은 언어로 발전할 것입니다.

 

 


Swift의 역사

 

 Swift 는 2010년 크리스 래트너가 개발을 시작하여 Objective-C, Ruby, Python, C#, Rust, Haskell, CLU 등 기존의 언어와 신생언어의 많은 부분을 참고하여 만들었습니다. 2014년 9월 Xcode 6과 함께 1.0버전을 공식 배포하고 2.1 버전 출시 다음 2015년 12월  오픈소스로 전환하여 공개하였습니다.

 

https://github.com/apple/swift-evolution

 

GitHub - apple/swift-evolution: This maintains proposals for changes and user-visible enhancements to the Swift Programming Lang

This maintains proposals for changes and user-visible enhancements to the Swift Programming Language. - GitHub - apple/swift-evolution: This maintains proposals for changes and user-visible enhance...

github.com

 

 

현재 (2022.03.08) 기준 5.5 버전까지 릴리즈 된 상태입니다.

 

 


Reference:

https://xtring-dev.tistory.com/entry/iOS-Object-C-vs-Swift Object-C vs Swift

https://blog.yagom.net/526/ Swift란 어떤 언어인가?

'iOS-Development' 카테고리의 다른 글

Lottie  (0) 2022.05.08
CoreData  (0) 2022.04.24
UserDefaults  (0) 2022.04.19
SwiftUI와 Storyboard  (0) 2022.04.03
Swift : 타입  (0) 2022.03.10
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2025/03   »
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31
글 보관함