On 2/08/2013 8:37 PM, John Gilmore wrote:
I am not sure that I know exactly what "a generic sort function" is.
As will come as no surprise to readers of my posts, I greatly prefer
PL/I to C; and in PL/I; generic is a compile-time facility.
Here's a good generic sort function
http://www.sgi.com/tech/stl/stable_sort.html.
If you prefer PL/I then good for you. I used to code PL/I and COBOL back
in the day and I won't denigrate either language.
I'm more thanl happy to invest my time to learn any language that can do
useful things. It's just semantics. It's a waste of time being a
language bigot.
C is more useful to me than PL/I. There is a massive amount of code out
there written in C that I can build on z/OS and happily use to do very
useful stuff.
IIRC, PL/I generics is parametric polymorphism just like function
overloading in C++/Java. How can you write a generic sort function in
PL/I using generics?
Let me also take this opportunity to recall that there are two sorts
of IEEE floating-point values, binary and decimal. Binary is somewhat
faster and in my view more elegant; but, as Mike Cowlishaw has pointed
out, decimal is much more perspicuous for non-nerds. zArchitecture
supports both, along with traditional System/360 hexadecimal
floating-point operations.
The generic question
What should the default be?
can be approached in two ways. One can urge that what one judges best
be the default; or one can choose the minimally disruptive value, the
default that requires fewest changes in code already in use.
John Gilmore, Ashland, MA 01721 - USA
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN