March 27, 2002 Re: String comparison == | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | Walter wrote:
> "Barry Pederson" <barryp@yahoo.com> wrote in message
>
>>But I think the later suggestion to use "a[] == b" to compare content is
>> even
>>better, since that seemed a good counterpoint to using "a[] = b" to copy
>>content (and made the .pointer thing not quite so necessary)
>
>
> That was my original plan, but it died a horrible death from ambiguities
> with the array slicing
> semantics.
I'm curious now ... what about array slicing threw a wrench in the works?
if (a[] == b)
if (a[w..x] == b)
if (a[] == b[y..z])
if (a[w..x] == b[y..z])
seem ok to me at first glance (of somebody not actually implementing the dang thing), unless you really wanted to compare-by-reference and not by-contents, in the 2nd and 4th cases.
Barry
|
March 14, 2017 Re: String comparison == | ||||
---|---|---|---|---|
| ||||
Posted in reply to Barry Pederson | On Wednesday, 27 March 2002 at 15:24:04 UTC, Barry Pederson wrote:
> Walter wrote:
>> "Barry Pederson" <barryp@yahoo.com> wrote in message
>>
>>>But I think the later suggestion to use "a[] == b" to compare content is
>>> even
>>>better, since that seemed a good counterpoint to using "a[] = b" to copy
>>>content (and made the .pointer thing not quite so necessary)
>>
>>
>> That was my original plan, but it died a horrible death from ambiguities
>> with the array slicing
>> semantics.
>
> I'm curious now ... what about array slicing threw a wrench in the works?
>
> if (a[] == b)
> if (a[w..x] == b)
> if (a[] == b[y..z])
> if (a[w..x] == b[y..z])
>
> seem ok to me at first glance (of somebody not actually implementing the dang thing), unless you really wanted to compare-by-reference and not by-contents, in the 2nd and 4th cases.
>
> Barry
Is there finally any solution nowadays?
|
March 19, 2017 Re: String comparison == | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jolly James | On Tuesday, 14 March 2017 at 01:01:05 UTC, Jolly James wrote:
> On Wednesday, 27 March 2002 at 15:24:04 UTC, Barry Pederson wrote:
>> Walter wrote:
>>> "Barry Pederson" <barryp@yahoo.com> wrote in message
>>>
>>>>But I think the later suggestion to use "a[] == b" to compare content is
>>>> even
>>>>better, since that seemed a good counterpoint to using "a[] = b" to copy
>>>>content (and made the .pointer thing not quite so necessary)
>>>
>>>
>>> That was my original plan, but it died a horrible death from ambiguities
>>> with the array slicing
>>> semantics.
>>
>> I'm curious now ... what about array slicing threw a wrench in the works?
>>
>> if (a[] == b)
>> if (a[w..x] == b)
>> if (a[] == b[y..z])
>> if (a[w..x] == b[y..z])
>>
>> seem ok to me at first glance (of somebody not actually implementing the dang thing), unless you really wanted to compare-by-reference and not by-contents, in the 2nd and 4th cases.
>>
>> Barry
>
> Is there finally any solution nowadays?
Still not? Really!?
|
March 22, 2017 Re: String comparison == | ||||
---|---|---|---|---|
| ||||
Posted in reply to Gand Alf | On Sunday, 19 March 2017 at 20:44:02 UTC, Gand Alf wrote:
> On Tuesday, 14 March 2017 at 01:01:05 UTC, Jolly James wrote:
>> On Wednesday, 27 March 2002 at 15:24:04 UTC, Barry Pederson wrote:
>>> Walter wrote:
>>>> "Barry Pederson" <barryp@yahoo.com> wrote in message
>>>>
>>>>>But I think the later suggestion to use "a[] == b" to compare content is
>>>>> even
>>>>>better, since that seemed a good counterpoint to using "a[] = b" to copy
>>>>>content (and made the .pointer thing not quite so necessary)
>>>>
>>>>
>>>> That was my original plan, but it died a horrible death from ambiguities
>>>> with the array slicing
>>>> semantics.
>>>
>>> I'm curious now ... what about array slicing threw a wrench in the works?
>>>
>>> if (a[] == b)
>>> if (a[w..x] == b)
>>> if (a[] == b[y..z])
>>> if (a[w..x] == b[y..z])
>>>
>>> seem ok to me at first glance (of somebody not actually implementing the dang thing), unless you really wanted to compare-by-reference and not by-contents, in the 2nd and 4th cases.
>>>
>>> Barry
>>
>> Is there finally any solution nowadays?
>
> Still not? Really!?
I think there is one. But I do not remember, left D programming for several reasons, but at least for this forum: lots of incompetent idiots, many questions getting ingored especially those from newbies (leads to banishing people interested in D). Please be so kind, don't waste your time here. Noone will ever reply.
|
Copyright © 1999-2021 by the D Language Foundation