Coder Social home page Coder Social logo

swiftguru's Introduction

Advanced Swift Workshop try! Swift @Bangalore

Purpose: The workshop is designed for software developers with prior experience in Swift. The outcome of this workshop is to help the participants familiarize with the advanced features and syntax of the Swift Programming Langauge by learning its rather unique approaches to solve design problems such as protocol-oriented, value-oriented, and functional programming.



Session 1: Functional Swift

1.1 Immutability and Pure Functions

Fundamentals of Functional Programming. Learn about the merits of immutability, pure and impure functions. In Swift, functions can be stored, passed as arguments, returned from other functions - they first class citizens!

1.2 Closures

Closures are anonymous functions. Their contribution to the "high expressiveness" is tremendous. They make code concise and readable at the same time!

1.3 Higher-order Functions

Functions that accept or return other functions are called higher order functions. The legendary map, filter, reduce and flatMap.

1.4 Higher-order Functions

Function composition make code readable and modular.

Session 2: Custom Operators

Swift is designed to be a highly expressive language. Support for custom operators on custom types works wonders in this direction. Swift actually allows you to define your own domain specific language by letting you define different kinds of operators and set the precedences.

Session 3: Protocols And Generics

Protocols is one of the cornerstones of Swift. Generics, in themselves, like those of any other language, are a crucial construct when it comes to writing the standard library. The primary application of generics is with protocols. In this session we'd also touch upon protocol oriented programming, associated types and type erasure.

Session 4: Sequences and Collections

Collections form the backbone of any langauge's standard library. Sequences and different kinds Collections in Swift are defined as protocols. The conformance rules to every protocol are very clearly stated. Conforming to any of the Collection protocol gives in return, a lot of functionality, making the API usage a great experience. Get hands-on to see how conformance to different protocols enriches your experience.

Session 5: Value, References, Indirection And Copy On Write

What's better - class or struct? Though many are heard advocating "programming with values", a programmer needs to appreciate the meaning of values and references to make some decision and how to make reference types have value semantics.

Session 6: Enums, Pattern Matching and Error Handling

In simple words, enums are types with a limited set of values. The values in turn, may have associated values. Pattern matching is typically done using the switch statement. The powers of enums and pattern matching can be realized only by using to together. One of the use cases of enums and pattern matching is error handling.

Session 7: Memory Management

Learn how to access memory directly from the unsafe swift API

Backup Topics

We'll deal with these only if there's time left after covering all of the above.

Codable and JSON

Introduced in Swift 4, the Codable interface along with the JSON encoding and decoding support, makes encoding to JSON and decoding out of JSON very easy.

KeyPaths

Discussed scantily for now, KeyPaths are quite a powerful construct introduced in Swift 4. They let you create a property reference into a deeply nested structure, allowing you to access and modify properties by the reference as an index.

swiftguru's People

Contributors

rahul0x24 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.