[swift-evolution] Proposal: Introduce User-defined "Dynamic Member Lookup" Types
Benjamin G
benjamin.garrigues at gmail.com
Thu Dec 7 04:00:16 CST 2017
On Thu, Dec 7, 2017 at 6:41 AM, Chris Lattner via swift-evolution <
swift-evolution at swift.org> wrote:
> On Dec 6, 2017, at 8:11 PM, Joe DeCapo via swift-evolution <
> swift-evolution at swift.org> wrote:
>
> Has all of this ruined the language thus far? No. Because the Swift core
> team doesn’t design, and the Swift community doesn’t adopt, ill-designed
> APIs that turn these facts into problems.
>
>
> Yeah, I think I'd prefer this to stay as a normal protocol conformance.
> But if the proportion of resistance is high enough,…
>
>
> Until, and if, the “resistance” presents some conceptual explanation of
> how this could cause harm (I’m not asking for anything concrete, just a
> logical series of events that causes a plausible problem in practice), my
> belief is that the Swift community will see this as unwarranted fear.
>
On the server side :
automatically generate an administration api for your model based on
introspection. Since swift doesn't provide anything convenient, and people
may simply try to "port" approach from python framework (like django),
they'll resort on recreating some kind of BaseDynamicObject that you'll
have to extend for all your base classe, using some "properties()" and
"methods()" functions to define your properties and methods for your model.
Or :
Automatically generate a database schema based on your model. Same idea.
>
> This is particularly true given that the proposal is completely consistent
> with previous design decisions in Swift, decisions which have served us
> well.
>
> -Chris
>
>
>
>
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20171207/fc445058/attachment.html>
More information about the swift-evolution
mailing list