[swift-evolution] [Proposal Draft] Flexible memberwise initialization
matthew at anandabits.com
Tue Jan 5 12:25:59 CST 2016
> On Jan 5, 2016, at 12:12 PM, Tino Heth <2th at gmx.de> wrote:
>> The “type parameter list” syntax is sugar that could be implemented as a layer on top of the current proposal or could be implemented orthogonally.
> Hi Howard,
> I've heard this argument before, so I'll repeat my answer as well:
> Both offers don't make sense, it's either one way or the other (or something completely different).
I don’t think it’s clear whether both make sense or not. They are not mutually exclusive and are aimed at solving related, but different problems. If we adopt the current proposal, the Kotlin / Scala syntax *might* make sense for some use cases. It would depend upon whether the current proposal is considered too verbose in enough cases or not. This may or may not turn out to be the case.
The reason my proposal looks the way it does is because there are specific goals it intends to achieve and problems it is intended to solve. These goals and problems are not adequately addressed by the Kotlin / Scala syntax.
> If diversity starts here, why not have "const" and "val" beside "let", or allow "fn" and "lambda"?
> @Matthew: Please, if you support something, then say so - using clear words, not phrases like "could be implemented”.
This phrasing is plenty clear IMO. I am stating a possibility. I do not have a position on whether or not it is a good idea at the moment.
I have made some modifications to the proposal over the last few days. These changes have been partly motivated by considering the conversation we have had. You may wish to give it another look. If so, please look here: https://github.com/anandabits/swift-evolution/blob/flexible-memberwise-initialization/proposals/0018-flexible-memberwise-initialization.md <https://github.com/anandabits/swift-evolution/blob/flexible-memberwise-initialization/proposals/0018-flexible-memberwise-initialization.md>. There is currently an open PR for the latest change so it is not in the main Swift evolution repo yet.
The most recent change includes a discussion of why it does not use the Scala / Kotlin syntax. You may not like the choice but I hope you can at least understand the rationale (even if you disagree with it).
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution