[Swift]The Swift Programming Language(Swift2.1)を読んで写経して学んだ

主に、Language Guideの箇所を全て読んで、写経して学びました。Swift2.0になって段階になったと周りから聞いたし、色々と本格的に関わる必要がでてきたので、ですね。

iBookで読んだのですが、HTMLでもあるのですね。こちらから参照することができました。

基礎的な言語仕様を写経しながら学んだので、OS提供のAPIに沿って何か開発できるところまではまだやってません。ただ、Test Engineerとしては言語仕様側をある程度知っておくことは入り口として必要なのでこちらから踏み入ってたりします。

Swiftは Class は参照型(reference type)、 enumstruct は値渡し(always copied)なのですね。なるほど。

Because classes are reference types, it is possible for multiple constants and variables to refer to the same single instance of a class behind the scenes. (The same is not true for structures and enumerations, because they are always copied when they are assigned to a constant or valuable, or passed to a function.)
https://itun.es/jp/jEUH0.l
In swift, may basic data types such as String, Array and Dictionary are implemeneted as structures. This means that data such as strings, arrays, and dictionaries are copied when they are assigned to a new constant or variable, or when they are passed to a function or method.

XCTest周りをちゃんと触っていこう。Parametarized Testって、SwiftやObjc-Cだとできるのだっけ。

1 Comment

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.