Phillip
Phillip
Sep 8, 2018 · 1 min read

Great article Max, I like the idea of using typealiases in a broader range of applications to make code more readable.

Just a thought: Have you noticed that function calls can’t be assigned to typealiases (only function signatures can)? The compiler rejects a function call assigned to a typealias as it states that it is an undeclared type:

func someFunction() {…}

typealias someTypealias = someFunction() // Use of undeclared type “someTypealias”

Functions are first class citizens in Swift and themselves are types defined by their signatures…

Would be interested to hear your thoughts on this

https://stackoverflow.com/questions/37908932/how-to-create-typealias-of-a-function-type-which-refers-to-a-particular-function

    Written by

    Phillip

    Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
    Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
    Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade