dynamic classes and duck typing

Walter Bright newshound1 at digitalmars.com
Wed Dec 2 17:04:28 PST 2009


Leandro Lucarella wrote:
> Bubble sort is perfeclty acceptable for, say, a 100 elements array.

> It always depends on the context, of course, but when doing programs that
> deals with small data sets and are mostly IO bounded, you *really* can
> care less about performance and big-O.

The thing about writing code that will be used by others is that they 
are not going to restrict themselves to small data sets.

For example, bubble sort. Putting that in a library is a disaster. You 
can't just write in the documentation that it is usable only for less 
than 100 elements.

One really does have to worry about big O performance, unless it is a 
throwaway program.



More information about the Digitalmars-d mailing list