I'll be back soon

Jonathan M Davis via Digitalmars-d digitalmars-d at puremagic.com
Wed Aug 10 03:46:12 PDT 2016


On Wednesday, August 10, 2016 10:33:11 Martin Nowak via Digitalmars-d wrote:
> On Wednesday, 10 August 2016 at 05:49:55 UTC, Ilya Yaroshenko
>
> wrote:
> > In addition, most of functions has very different API comparing
> > with their prototypes from std.algorithms: multiple dimensions,
> > multiple tensors, selection type, plus ndFind accepts static
> > array as the first argument.
>
> Overloads from different modules don't conflict when it's not
> possible to one of them. So if all of ndslice.algorithm functions
> only work with ndslices, and none of std.algorithm functions work
> with ndslices, you're fine.
> I'd even consider forwarding std.algorithm.searching.find to
> ndslice.algorithm.find a better solution than adding awkward
> prefixes that look like we're using C.
>
> I haven't yet used ndslice much though.

I haven't really looked at ndslice yet, so maybe it makes more sense in its
case than it does normally, but putting prefixes on functions like that
seems like a serious code smell. Part of the reason that have a module
system like we have is to be able to distinguish and separate functions that
have the same name.

- Jonathan M Davis



More information about the Digitalmars-d mailing list