3 ms·
A couple more interesting swift features that seemed a bit weird to me after skipping through the reference: 1. Strings, arrays and dictionaries are value type
by sergejsb 12y ago
A couple more interesting swift features that seemed a bit weird to me after skipping through the reference:
1. Strings, arrays and dictionaries are value types (like structs in C# - stored on stack, not on the heap) with special copying rules for arrays.
2. Custom operators - can be defined as a sequence of "/ = - + * % < > ! & | ^ . ~" characters and made prefix, infix or postfix. There is an example in the reference that defines a prefix operator "+++" for vectors