Upgrade to Pro — share decks privately, control downloads, hide ads and more …

개발자를 위한 영어 문법

Soojin Ro
August 21, 2018

개발자를 위한 영어 문법

“프로그램은 사람들에게 읽히기 위한 목적으로 만들어져야 하고, 우연히 컴퓨터가 실행할 수 있다면 더욱 좋다.”
- SICP

사람에게 잘 읽히는 스위프트 코드를 작성하기 위해 알아야하는 최소한의 영어 문법을 정리했습니다.

발표 녹화본: https://tv.naver.com/v/4980432

같이 읽으면 좋은 글
https://soojin.ro/blog/naming-boolean-variables
https://soojin.ro/blog/english-for-developers-swift

Soojin Ro

August 21, 2018
Tweet

More Decks by Soojin Ro

Other Decks in Programming

Transcript

  1. زࢎਗഋ җѢഋ җѢ࠙ࢎഋ SFRVFTU SFRVFTUFE SFRVFTUFE NBLF NBEF NBEF IJEF

    IJE IJEEFO ೣࣻݫࢲ٘ীࢎਊ ઑزࢎ DBOTIPVME١ ٍী FHDBO#FDPNF'JSTU3FTQPOEFS -JGF$ZDMFҙ۲EFMFHBUF FHEJE3FDFJWF XJMM"QQFBS EJE$PNQMFUF زࢎ੄߸ഋ
  2. #PPM ੄޷ ৘द JT ݺࢎ _ੋо JT%FTDBOEBOU PG JT7JEFP JT'BWPSJUF

    JT അ੤૓೯ഋ _JOH _ೞח઺ੋо JT&YFDVUJOH JT1FOEJOH JT ഋਊࢎ _ੋо JT0QBRVF JT&EJUBCMF _غ঻חо JT4FMFDUFE JT)JEEFO DBOTIPVMEXJMM زࢎਗഋ _ೡࣻ੓ա _೧ঠೞա  _ೡѪੋо  DBO#FDPNF'JSTU3FTQPOEFS IBT ݺࢎ _ਸо૑Ҋ੓חо IBT7JEFP IBTJ$MPVE"DDPVOU IBT җѢ࠙ࢎ _غ঻חо  ࢚క੄૑ࣘъઑ IBT$POOFDUFE IBT&OEFE زࢎਗഋਊߨ  QSFTFSWFT4VQFSWJFX-BZPVU.BSHJOT JT زࢎਗഋ ൔ൤ೞחपࣻ JT"VUIPSJ[F JT%FMFUF JT'JOE JT"EE ❗
  3. ױࣻ৬ࠂࣻ let album: Album let albums: [Album] for album in

    albums { } var album: [Album] let coverSongs = album.map { $0.coverSong } var album: Album? let artwork = album.map { downloader.image(from: $0.artworkURL) } ❓
  4. ࠛӏ஗ࠂࣻഋ ױࣻ ࠂࣻ WJFX WJFXT CPY CPYFT IBTI IBTIFT DBUFHPSZ

    DBUFHPSJFT GBDUPSZ GBDUPSJFT IBMG IBMWFT DIJME DIJMESFO QFSTPO QFPQMF JOEFY JOEFYFT JOEJDFT EBUVN EBUB
  5. 63- var fullSizeImageURL: URL? //PHContentEditingInput var renderedContentURL: URL //PHContentEditingOutput var

    originalURL: URL? //MLMediaObject var thumbnailURL: URL? //MLMediaObject var assetURL: URL? //MPMediaItem var referenceURL: URL //SCNReferenceNode
  6. 6**NBHF var referenceImage: ARReferenceImage? //ARImageAnchor var displaySizeImage: UIImage? //PHContentEditingInput var

    fullSizeImage: CIImage //PHLivePhotoEditingContent var iconImage: NSImage? //MLMediaGroup var artworkImage: NSImage? //MLMediaObject
  7. 4J[F %BUF %BUB var physicalSize: CGSize //ARReferenceImage var startDate: Date

    //AVMutable…Group var creationDate: Date? //PHAsset var arrivalDate: Date //CLVisit var adjustmentData: PHAdjustmentData? //PHContentEditingInput
  8. FUD var identifier: AVMetadataIdentifier? { get } //AVMetadataItem var localIdentifier:

    String { get } //PHObject var formatIdentifier: String { get } //PHAdjustmentData var identifier: String { get } //CLRegion var identifier: String { get } //MLMediaGroup var identifier: String { get } //SCNReferenceNode var identifier: String { get } //NSPersistentStore var objectID: NSManagedObjectID { get } //NSManagedObjectID var recordID: CKRecordID { get } //CKRecord var uniqueID: String? { get } //AVMetadataGroup *%WT*EWTJEFOUJGJFS
  9. ઺ࠂઁѢ struct User { let userID: String } let id

    = user.userID struct User { let identifier: String } let id = user.identifier
  10. struct ImageDownloader { func downloadImage(from url: URL) {} } let

    imageDownloader = ImageDownloader() imageDownloader.downloadImage(from: imageURL) imageDownloader.download(from: imageURL) imageManager.download(from: imageURL) imageDownloader.fetch(from: imageURL) ઺ࠂઁѢ
  11. HFU❌ func date(from string: String) -> Date? func anchor(for node:

    SCNNode) -> ARAnchor? func distance(from location: CLLocation) -> CLLocationDistance func track(withTrackID trackID: CMPersistentTrackID) -> AVAssetTrack?
  12. let date = formatter.date(from: dateString) let imageAnchor = sceneView.anchor(for: node)

    let distance = startLocation.distance(from: destination) let track = asset.track(withTrackID: identifier) HFU❌
  13. HFU func getPlaylist(with uuid: UUID, creationMetadata: MPMediaPlaylistCreationMetadata?, completionHandler: @escaping (MPMediaPlaylist?,

    Error?) -> Void) class func fetchAssets(withLocalIdentifiers identifiers: [String], options: PHFetchOptions?) -> PHFetchResult<PHAsset> func requestImage(for asset: PHAsset, targetSize: CGSize, contentMode: PHImageContentMode, options: PHImageRequestOptions?, resultHandler: @escaping (UIImage?, [AnyHashable : Any]?) -> Void) -> PHImageRequestID func execute(_ request: NSPersistentStoreRequest) throws -> NSPersistentStoreResult ݫࢲ٘ SFRVFTU GFUDI FYFDVUFQFSGPSN
  14. //PHAsset class func fetchAssets(withLocalIdentifiers identifiers: [String], options: PHFetchOptions?) -> PHFetchResult<PHAsset>

    //PHAssetCollection class func fetchAssets(in assetCollection: PHAssetCollection, options: PHFetchOptions?) -> PHFetchResult<PHAsset> //NSManagedObjectContext func fetch<T>(_ request: NSFetchRequest<T>) throws -> [T] where T : NSFetchRequestResult GFUDI
  15. //PHImageManager func requestImage(for asset: PHAsset, targetSize: CGSize, contentMode: PHImageContentMode, options:

    PHImageRequestOptions?, resultHandler: @escaping (UIImage?, [AnyHashable : Any]?) -> Void) -> PHImageRequestID //PHAssetResourceManager func requestData(for resource: PHAssetResource, options: PHAssetResourceRequestOptions?, dataReceivedHandler handler: @escaping (Data) -> Void, completionHandler: @escaping (Error?) -> Void) -> PHAssetResourceDataRequestID //CLLocationManager func requestAlwaysAuthorization() func requestLocation() //MLMediaLibrary class func requestAuthorization(_ handler: @escaping (MPMediaLibraryAuthorizationStatus) -> Void) SFRVFTU
  16. //VNImageRequestHandler func perform(_ requests: [VNRequest]) throws //PHAssetResourceManager func performChanges(_ changeBlock:

    @escaping () -> Void, completionHandler: ((Bool, Error?) -> Void)? = nil) //NSManagedObjectContext func perform(_ block: @escaping () -> Void) //CNContactStore func execute(_ saveRequest: CNSaveRequest) throws //NSFetchRequest func execute() throws -> [ResultType] FYFDVUFQFSGPSN