[swift-evolution] [Proposal] Explicit Synthetic Behaviour

Andrew Thompson mrwerdo331 at me.com
Wed Sep 6 23:00:20 CDT 2017

>> On Sep 6, 2017, at 1:32 AM, Haravikk via swift-evolution <swift-evolution at swift.org> wrote:
>> As a general rule I would argue that Mirrors should almost never be used for any purpose, except perhaps debugging; in production code they can lead to subtle and misleading problems, not to mention any performance impacts. Even for things like serialising types, it is not a desirable way to do it, and should only be used as a last resort because of missing features in Swift.
> I'm just going to toss in that you and I apparently have diametrically opposed needs and belief systems about what makes for a good programming language.  I believe the exact opposite.
> After 20+ years of Cocoa development, I rely on these features heavily and consider any language that lacks them to be more or less "dead" where I consider languages that have them to be "self aware" and "lively".
> For instance, I think relying on the compiler to generate special code to implement Codable rather than just exposing the meta facilities required to do introspection is taking the long way around rather than the short cut.
> So add my vote for powerful reflection capabilities.

Perhaps we could find a solution by meeting in the middle. Introduce a compiler flag that will disable the automatic synthesis and revert to the old behaviour (i.e. swiftc main.swift —disable-automatic-synthesis )

Andrew Thompson

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170907/23d24a26/attachment.html>

More information about the swift-evolution mailing list