Custom operators in Swift

John Sundell has written a great piece about using custom operators in Swift. Some really interesting examples as well. I never really thought about custom operators like he has, but clearly they can be very powerful tools:

Few Swift features cause as much heated debate as the use of custom operators. While some people find them really useful in order to reduce code verbosity, or to implement lightweight syntax extensions, others think that they should be avoided completely.

Love ’em or hate ’em – either way there are some really interesting things that we can do with custom operators – whether we are overloading existing ones or defining our own. This week, let’s take a look at a few situations that custom operators could be used in, and some of the pros & cons of using them.

Read the full post.