Re: Duplicated functions not reported?

2017-04-16 Thread Ola Fosheim Grostad via Digitalmars-d-learn
On Sunday, 16 April 2017 at 15:54:16 UTC, Stefan Koch wrote: sorting has O(n^2) worst case complexity. Therefore totaling to O(n^2) worst case again. Sorting with comparison is solved in O(n log n). If you have an upper limit on signature length then the problem is solvable for the whole

Re: Duplicated functions not reported?

2017-04-16 Thread Stefan Koch via Digitalmars-d-learn
On Sunday, 16 April 2017 at 17:10:14 UTC, Temtaime wrote: On Sunday, 16 April 2017 at 15:54:16 UTC, Stefan Koch wrote: On Sunday, 16 April 2017 at 10:56:37 UTC, Era Scarecrow wrote: On Saturday, 15 April 2017 at 11:10:01 UTC, Stefan Koch wrote: It would requires an O(n^2) check per

Re: Duplicated functions not reported?

2017-04-16 Thread Temtaime via Digitalmars-d-learn
On Sunday, 16 April 2017 at 15:54:16 UTC, Stefan Koch wrote: On Sunday, 16 April 2017 at 10:56:37 UTC, Era Scarecrow wrote: On Saturday, 15 April 2017 at 11:10:01 UTC, Stefan Koch wrote: It would requires an O(n^2) check per declaration. Even it is never used. which would make imports that

Re: Duplicated functions not reported?

2017-04-16 Thread Stefan Koch via Digitalmars-d-learn
On Sunday, 16 April 2017 at 10:56:37 UTC, Era Scarecrow wrote: On Saturday, 15 April 2017 at 11:10:01 UTC, Stefan Koch wrote: It would requires an O(n^2) check per declaration. Even it is never used. which would make imports that much more expensive. Seems wrong to me... If you made a

Re: Duplicated functions not reported?

2017-04-16 Thread Era Scarecrow via Digitalmars-d-learn
On Saturday, 15 April 2017 at 11:10:01 UTC, Stefan Koch wrote: It would requires an O(n^2) check per declaration. Even it is never used. which would make imports that much more expensive. Seems wrong to me... If you made a list/array of all the functions (based purely on signatures) then

Re: Duplicated functions not reported?

2017-04-15 Thread Jacob Carlborg via Digitalmars-d-learn
On 2017-04-15 13:10, Stefan Koch wrote: It would requires an O(n^2) check per declaration. Even it is never used. which would make imports that much more expensive. Does it need to be that bad? Isn't it possible to do some simple checks with less overhead? Something like first checking the

Re: Duplicated functions not reported?

2017-04-15 Thread Stefan Koch via Digitalmars-d-learn
On Saturday, 15 April 2017 at 09:17:08 UTC, Jacob Carlborg wrote: I'm not sure if I'm missing something obvious here, but the following code compiles and runs: void foo() {} void foo() {} void main() {} Although if I do call "foo", the compiler will complain that it matches both versions of

Duplicated functions not reported?

2017-04-15 Thread Jacob Carlborg via Digitalmars-d-learn
I'm not sure if I'm missing something obvious here, but the following code compiles and runs: void foo() {} void foo() {} void main() {} Although if I do call "foo", the compiler will complain that it matches both versions of "foo". Is this expected behavior of how function overloading