On Friday, 25 October 2019 at 21:06:53 UTC, IGotD- wrote:
On Friday, 25 October 2019 at 20:44:18 UTC, Dennis wrote:
On Friday, 25 October 2019 at 19:49:05 UTC, Ali Çehreli wrote:
I'm still not completely sold on the whole idea though
because it's not a clear win.
Do others see other
On Friday, 25 October 2019 at 20:44:18 UTC, Dennis wrote:
On Friday, 25 October 2019 at 19:49:05 UTC, Ali Çehreli wrote:
I'm still not completely sold on the whole idea though because
it's not a clear win.
Do others see other advantages in other places like templates?
For example, could
On Friday, 25 October 2019 at 19:49:05 UTC, Ali Çehreli wrote:
I'm still not completely sold on the whole idea though because
it's not a clear win.
Do others see other advantages in other places like templates?
For example, could templates really be written generically for
arrays and
On 10/25/2019 02:25 AM, Dennis wrote:
> On Friday, 25 October 2019 at 05:17:35 UTC, Ali Çehreli wrote:
>> - Big O is different
>
> No it isn't.
Agreed and I've just realized a benefit of the 'in' operator for arrays,
which I haven't heard before. (I don't follow all discussions in
detail.)
On Friday, 25 October 2019 at 16:01:57 UTC, mipri wrote:
On Friday, 25 October 2019 at 15:52:50 UTC, Paul Backus wrote:
On Friday, 25 October 2019 at 09:25:21 UTC, Dennis wrote:
I can overload the 'in' operator on my types to something
that takes exponential time if I want, just like "+" can
On Thursday, 24 October 2019 at 12:58:11 UTC, lili wrote:
Hi:
In Dlang where is strange design. The in expression can only
use to associative array, why array can not use in expression.
I don't see much of a problem why this couldn't be implemented as
long as the user understands the
On Friday, 25 October 2019 at 15:52:50 UTC, Paul Backus wrote:
On Friday, 25 October 2019 at 09:25:21 UTC, Dennis wrote:
I can overload the 'in' operator on my types to something that
takes exponential time if I want, just like "+" can also be
overloaded to a linear time operation on e.g.
On Friday, 25 October 2019 at 09:25:21 UTC, Dennis wrote:
I can overload the 'in' operator on my types to something that
takes exponential time if I want, just like "+" can also be
overloaded to a linear time operation on e.g. BigInt.
Worth noting that `opIn` is a D1 operator overload, and
On Friday, 25 October 2019 at 05:17:35 UTC, Ali Çehreli wrote:
- Big O is different
No it isn't. Worst case lookup of an associative array lookup is
O(n) too. It can easily be 'achieved' by having a key type with:
```
size_t toHash() const scope pure {
return 0;
}
```
The fact that
On 10/24/2019 05:58 AM, lili wrote:
> Hi:
> In Dlang where is strange design. The in expression can only use to
> associative array, why array can not use in expression.
In addition to the big O surprise, there is another important issue that
may be seen as either for or against supporting
On Thursday, October 24, 2019 8:40:59 PM MDT lili via Digitalmars-d-learn
wrote:
> On Thursday, 24 October 2019 at 22:40:31 UTC, Jonathan M Davis
>
> wrote:
> > On Thursday, October 24, 2019 7:04:56 AM MDT Paul Backus via
> >
> > Digitalmars-d- learn wrote:
> >> On Thursday, 24 October 2019 at
On Thursday, 24 October 2019 at 22:40:31 UTC, Jonathan M Davis
wrote:
On Thursday, October 24, 2019 7:04:56 AM MDT Paul Backus via
Digitalmars-d- learn wrote:
On Thursday, 24 October 2019 at 12:58:11 UTC, lili wrote:
> Hi:
>In Dlang where is strange design. The in expression can
> only
>
On Thursday, October 24, 2019 7:04:56 AM MDT Paul Backus via Digitalmars-d-
learn wrote:
> On Thursday, 24 October 2019 at 12:58:11 UTC, lili wrote:
> > Hi:
> >In Dlang where is strange design. The in expression can only
> >
> > use to associative array, why array can not use in expression.
>
On Thursday, 24 October 2019 at 12:58:11 UTC, lili wrote:
Hi:
In Dlang where is strange design. The in expression can only
use to associative array, why array can not use in expression.
Checking for the presence of an item in an array requires a
linear search. You can do it with
14 matches
Mail list logo