[swift-evolution] [Pitch] Retiring `where` from for-in loops
let var go
letvargo at gmail.com
Mon Jun 13 10:23:50 CDT 2016
I am 100% with Charlie on this. Expressiveness has to do with the
*effectiveness* of conveying a thought or a feeling.
Keep "where". It is expressive. It conveys a specific idea effectively and
concisely.
On Mon, Jun 13, 2016 at 7:54 AM Charlie Monroe via swift-evolution <
swift-evolution at swift.org> wrote:
> On Jun 13, 2016, at 4:46 PM, Xiaodi Wu <xiaodi.wu at gmail.com> wrote:
>
> On Mon, Jun 13, 2016 at 9:28 AM, Sean Heber <sean at fifthace.com> wrote:
>
>> I’m just (probably obtusely) suggesting that there are different levels
>> and styles of expression and that the existence of one does not render
>> other styles invalid.
>>
>> In relation to the “where” debate, the fact that you can express
>> everything with “guard” or “if” as you can with “where” is not, in my mind,
>> a strong argument against “where” because it ignores other more intangible
>> aspects that are going to be a lot harder to quantify since they depend on
>> the context of the problem, the surrounding code, the mindset of the
>> writer, and the assumed mindset of the reader.
>>
>> I don’t dispute that we *could* live without “where” - that is not the
>> point. We could also live without classes or generics or any of a variety
>> of other features - but why should we when we don’t have to?
>>
>
> I'm not sure where this comes in. I was clarifying what I mean when I call
> a language construct 'expressive.' As I understand the term, `where` is not
> expressive, whereas classes and generics are expressive.
>
>
> Perhaps this is due to English not being my first language, but I go by
> the dictionary definition of expressive:
>
> expressive (adjective) - effectively conveying thought or feeling.
>
> And I believe that for-in-where is expressing the condition more
> effectively (and efficiently) than adding if/guard-continue into the actual
> code block.
>
>
>
>>
>> l8r
>> Sean
>>
>>
>> > On Jun 13, 2016, at 9:19 AM, Xiaodi Wu <xiaodi.wu at gmail.com> wrote:
>> >
>> > How do you mean? I don't follow.
>> > On Mon, Jun 13, 2016 at 09:11 Sean Heber <sean at fifthace.com> wrote:
>> > > On Jun 13, 2016, at 9:05 AM, Xiaodi Wu via swift-evolution <
>> swift-evolution at swift.org> wrote:
>> > >
>> > > On Mon, Jun 13, 2016 at 8:58 AM, Charlie Monroe <
>> charlie at charliemonroe.net> wrote:
>> > > if-continue. But I gladly took upon for-in-where as soon as I found
>> out about it since it's more expressive and simply is less typing.
>> > >
>> > > I don't think we use the term 'expressive' in the same way. I
>> understand it to mean that permitting the expression of more things. But of
>> course, `where` does only a subset of `guard...continue` or
>> `if...continue`; thus, less expressive.
>> >
>> > The fact that you could simply use the words “I am happy” to express
>> the concept of being happy does not mean that writing a complex poem that
>> also conveys happiness should therefore be prohibited.
>> >
>> > l8r
>> > Sean
>> >
>>
>>
> _______________________________________________
> 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/20160613/39e848a8/attachment.html>
More information about the swift-evolution
mailing list