Open in app

Sign In

Write

Sign In

Alexey Demedeckiy
Alexey Demedeckiy

324 Followers

Home

About

Jan 11, 2018

How to supercharge Swift enum-based states with Sourcery

I really love enums with associated values in Swift and it’s my main tool for designing state. Why are enums so much more powerful and beautiful option? Mostly because they allow me to keep strong invariants about the data in my type system. For example, if I have a screen…

Swift

6 min read

How to supercharge Swift enum-based states with Sourcery
How to supercharge Swift enum-based states with Sourcery
Swift

6 min read


Apr 20, 2017

Swift AST. Init, Deinit, Subscript.

This is 8th part of my series about creating Swift AST in Swift. In this part I will cover special kinds of function-like declarations. You can find previous part here. Init In swift initializer is a common declaration, not required to be nested in class declaration. It is following pattern from…

Swift

3 min read

Swift AST. Init, Deinit, Subscript.
Swift AST. Init, Deinit, Subscript.
Swift

3 min read


Apr 9, 2017

Swift AST written in Swift. Part 7 of ∞

In previous part I have cover struct and class declarations. In this part I will describe another fundamental pillar of Swift language: protocols. As usually, let’s start from looking on grammar: Well, it is looks like class and struct a lot. But instead of allow any declaration to be defined…

Swift

3 min read

Swift AST written in Swift. Part 7 of ∞
Swift AST written in Swift. Part 7 of ∞
Swift

3 min read


Mar 23, 2017

Swift AST written in Swift. Part 6 of ∞

In previous part I have covered enum declaration, and found that there is two different enums in swift. In this one I will cover two entities at one time: struc and class. They are pretty similar to each other. But serving different roles at runtime. Struct Let’s start, as usuall, from…

Swift

2 min read

Swift AST written in Swift. Part 6 of ∞
Swift AST written in Swift. Part 6 of ∞
Swift

2 min read


Mar 22, 2017

Swift AST written in Swift. Part 5 of ∞

In previous part I have covered function declaration. I started simplify grammar for AST needs. Making resulting types as easy to use as I can. In this part I will cover enumeration declaration. As usually, let’s look on grammar part: First of all, surprisingly, raw value enum has special syntax…

Swift

3 min read

Swift AST written in Swift. Part 5 of ∞
Swift AST written in Swift. Part 5 of ∞
Swift

3 min read


Mar 21, 2017

Swift AST written in Swift. Part 4 of ∞

In previous part I have discussed let and var declrartions grammar. As I discovered, grammar reflects not all syntax restrictions of the language. In this part I will discover structure of function declaration. Let’s start from looking at formal grammar definition: Single root declaration is good. It also contains a…

Swift

2 min read

Swift AST written in Swift. Part 4 of ∞
Swift AST written in Swift. Part 4 of ∞
Swift

2 min read


Mar 18, 2017

Swift AST written in Swift. Part 3 of ∞

In last post I have start covering Declaration grammar section of Swift grammar. In this post I will cover let and var declarartion. This is really tricky part with another portion of Swift grammar weirdinness. Let Let’t start from simpler one — let. Here is the grammar: Nothing conceptually new. Let’s…

Swift

5 min read

Swift AST written in Swift. Part 3 of ∞
Swift AST written in Swift. Part 3 of ∞
Swift

5 min read


Mar 14, 2017

Swift AST written in Swift. Part 2 of ∞

In previous part I did build basic top level AST for Swift language. Nothing spectacular yet. Just some enums and strict data modelling. Today I am going to dig little deeper and replicate Declaration section of a Swift grammar. Let’s look into it: It is look all identical to statements…

Swift

4 min read

Swift AST written in Swift. Part 2 of ∞
Swift AST written in Swift. Part 2 of ∞
Swift

4 min read


Mar 13, 2017

Swift AST written in Swift. Part 1 of ∞

I have to confess. I love types. I love power and constraints that type system brought to you. I don’t love typing, so I love when type inference allows me to not carry my types with me. And in my possession with types, I want to create something significant, something…

Swift

3 min read

Swift AST written in Swift. Part 1 of ∞
Swift AST written in Swift. Part 1 of ∞
Swift

3 min read


Nov 25, 2015

iOS apps architecture with Swift in mind

Recently Apple has released Swift 2.0 and I delve into it for production development. Before that, I have written my software around MVVM pattern in pure Objective-C. If you are interested in this approach you can check Github repo with the reference code. One of the fundamental components of Objective-C…

React

6 min read

iOS apps architecture with Swift in mind
iOS apps architecture with Swift in mind
React

6 min read

Alexey Demedeckiy

Alexey Demedeckiy

324 Followers
Following
  • Muzli

    Muzli

  • Fwdays

    Fwdays

  • Yaroslav Stepanenko

    Yaroslav Stepanenko

  • Eric Elliott

    Eric Elliott

  • Alexander Perepelitsyn

    Alexander Perepelitsyn

See all (148)

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Text to speech

Teams