Category Archives: Sideblog

Sideblog posts. Usually links to news stories with a quick comment by me.

Changes to Swift

Changes to Swift in Beta 6. When I played around with Swift last week I was shocked how much of my code from June needed tweaking. I’m definitely going to wait until Swift settles down a little before going again.

Related Posts

  • 44
    I’d mentioned in passing in one of my Swift posts about using it as a scripting language. Someone on Twitter asked me if I’d convert from using Python to Swift for my scripts. It’s an excellent question that I really can’t answer fully at this stage. The language is still very beta. Most of the…
    Tags: swift, code

Error Handling in Swift

Better error handling in Swift. (HT: Brent Simmons indirectly) Very cool. Even better than returning tuples as in Python.

Related Posts

  • 49
    I’d mentioned in passing in one of my Swift posts about using it as a scripting language. Someone on Twitter asked me if I’d convert from using Python to Swift for my scripts. It’s an excellent question that I really can’t answer fully at this stage. The language is still very beta. Most of the…
    Tags: swift, python

Euler

Euler — custom math operators using unicode operators. (HT: ManiacDev) I think some go a bit much. Why on earth use × instead of * for multiplication? Why not save × for cross product of vectors? But the logic and set notation is very elegant. I like the dot product operator but suspect it’d be hard to read since it looks so much like a period. I also like the ± operator which returns a tuple with the range just like you’d expect from science. Again this is the sort of thing you use for inspiration but wouldn’t want to use the whole thing.