www.hackingwithswift.com/quick-start/understanding-swift/how-does-swift-let-us-compare-many-types-of-data
1 Users
0 Comments
3 Highlights
0 Notes
Tags
Top Highlights
Swift implements this in a remarkably clever way that actually allows it to compare a wide variety of things.
For example, Swift has a special type for storing dates called Date, and you can compare dates using the same operators: someDate < someOtherDate, for example.
Swift lets us compare many kinds of values out of the box, which means we can check a variety of values for equality and comparison.
Glasp is a social web highlighter that people can highlight and organize quotes and thoughts from the web, and access other like-minded people’s learning.