[swift-users] Doubt about the runtime system

2017-06-06 Thread Ronaldo Faria Lima via swift-users
Hi, all. I´m currently developing a solution that will apply a theme using appearance proxies. The idea is to have a configuration file where the developer will say which class he wants to customize and which properties with its corresponding values. For instance, let´s say that one want to c

[swift-users] DateFormatter bug

2017-05-15 Thread Ronaldo Faria Lima via swift-users
Hi, all. During a discussion in CocoaHeads Brazil, one developer came with a very odd situation involving Foundation’s DateFormatter class. Here is the code: import Foundation let fmt = DateFormatter() fmt.dateFormat = "-MM-dd" let aDate = fmt.date(from: "2017-10-15”) The variable aDate is

Re: [swift-users] Making Error sub-enums Equatable

2017-05-10 Thread Ronaldo Faria Lima via swift-users
Rigorously, one should avoid to force the purpose of a given feature of a language or library construct. If you use Equatable, you must take into account the associated values for the sake of semantics. However, you are free to create your own infix operator that could allow you compare your en