Re: [swift-evolution] Idea: Use for default implementation of ?

2017-07-14 Thread Jean-Daniel via swift-evolution
If we generate a default• debugDescription for encodable type, I would rather use a human readable formatted string that explicitly do not guarantee to remain stable. JSON is very limited in the types it supports (it does not even supports date natively). A debug description should not

Re: [swift-evolution] Idea: Use for default implementation of ?

2017-07-12 Thread Itai Ferber via swift-evolution
This would be possible, but I have the following concerns about doing something like this: * This would only be available when Foundation is imported (since this would require access to `JSONEncoder`). This could make debugging confusing if you don’t always import Foundation * What do you get

[swift-evolution] Idea: Use for default implementation of ?

2017-07-12 Thread William Shipley via swift-evolution
Would it be possible for items that implement to automatically get with a default implementation that just calls encode into a JSON blob and then dumps it to the screen? Any drawbacks to doing this? -Wil ___ swift-evolution mailing list swift-evolut