[Home]Insertion sort/Talk

HomePage | Insertion sort | Recent Changes | Preferences

Difference (from prior minor revision) (no other diffs)

Changed: 1c1,11
Question: Which language is the example implementation written in?
Question: Which language is the example implementation written in?

The example is written in Python.
I'm planning on simplifying it a bit, in particular to remove the cmp function being passed as a parameter:

*A built-in function cmp() already exists, and means something different (-ve if a<b, 0 if a=b, +ve if a>b);
*IMO, Python's lambda notation and default arguments are not appropriate for near pseudo-code;
*"a > b" is much better for trying to understand an algorithm than a function call.
*Custom Python types can define their own comparisons anyway, so a comparator parameter is unnecessary.

--Carey Evans

Question: Which language is the example implementation written in?

The example is written in Python. I'm planning on simplifying it a bit, in particular to remove the cmp function being passed as a parameter:

--Carey Evans


HomePage | Insertion sort | Recent Changes | Preferences
This page is read-only | View other revisions
Last edited December 16, 2001 6:48 am by Carey Evans (diff)
Search: