Matt Makai - Python web dev & Twilio Developer Evangelist.

@mattmakai on Twitter & GitHub

Learning Swift

08.02.2015

  • Bought an Apple Watch. Oh my.
  • Dictionaries use the [] symbols, which is confusing coming from Python where you'd use {}.
  • && is used to combine if conditionals and || are used to perform OR on conditionals. Again, different from using the and and or keywords.
  • Bool is the boolean variable type, true and false are the values, with lowercase charaters for the first letters on the values.
  • else if is how to define else if in if conditionals, rather than elif in Python.

08.01.2015

  • A Swift protocol is conceptually equivalent to a Java interface. A Swift class that adopts a protocol conforms to the protocol.
  • A class can adopt zero, one or many protocols.