Archive for January, 2005

Polymorphism

I have seen this word a few time and each time I though I knew what it was. Well I had no Idea and where I was reading it was articles about programing, object oriented programing in fact. Well I finally looked it up and I found this little helpful definition.

polymorphism

A concept first identified by Christopher Strachey (1967) and developed by Hindley and Milner, allowing types such as list of anything. E.g. in Haskell:

length :: [a] -> Int

is a function which operates on a list of objects of any type, a (a is a type variable). This is known as parametric polymorphism. Polymorphic typing allows strong type checking as well as generic functions. ML in 1976 was the first language with polymorphic typing.

Ad-hoc polymorphism (better described as overloading) is the ability to use the same syntax for objects of different types, e.g. “+” for addition of reals and integers or “-” for unary negation or diadic subtraction. Parametric polymorphism allows the same object code for a function to handle arguments of many types but overloading only reuses syntax and requires different code to handle different types.

See also generic type variable.

In object-oriented programming, the term is used to describe a variable that may refer to objects whose class is not known at compile time and which respond at run time according to the actual class of the object to which they refer.

Well take a look at the last paragraph (of course it’s the last paragraph) is a clear explanation of polymorphism. Boy is this useful but the only thing is I would with Cold Fusion MX and this is nye impossible. Well if any of you actually read this flimsy excuse for a blog can you point me in a direction that will allow me to figure out how to do this in CF? I understand what it means but actually doing it is always the harder of the two.

you can find out more here:

http://dictionary.reference.com/search?r=4&q=polymorphism
http://www.google.com/search?hl=en&lr=&q=polymorphism&btnG=Search

kindergarten

A quote for you:


Most of what I really need to know about how to live, and what to do, and how to be, I learned in kindergarten. Wisdom was not at the top of the graduate school mountain but there in the sandbox at nursery school.

These are the things I learned: Share everything. Play fair. Don’t hit people. Put things back where you found them. Clean up your own mess. Don’t take things that aren’t yours. Say you’re sorry when you hurt someone. Wash your hands before you eat. Flush. Warm cookies and cold milk are good for you. Live a balanced life. Learn some and think some and draw and paint and sing and dance and play and work some every day.

Take a nap every afternoon. When you go out into the world, watch for traffic, hold hands, and stick together. Be aware of wonder. Remember the little seed in the plastic cup. The roots go down and the plant goes up and nobody really knows how or why, but we are all like that. Goldfish and hamsters and white mice and even the little seed in the plastic cup — they all die. So do we.

And then remember the book about Dick and Jane and the first word you learned, the biggest word of all: LOOK. Everything you need to know is in there somewhere. The Golden Rule and love and basic sanitation. Ecology and politics and sane living.

Think of what a better world it would be if we all — the whole world — had cookies and milk about 3 o’clock every afternoon and then lay down with our blankets for a nap. Or if we had a basic policy in our nation and other nations to always put things back where we found them and cleaned up our own messes. And it is still true, no matter how old you are, when you go out into the world it is best to hold hands and stick together.

– Robert Fulghum, “All I ever really needed to know I learned in kindergarten”