Saturday, December 27, 2008

Apple Polymorphism

There were times when I thought apple was more than just a juicy fruit that satisfied our taste buds. Apple being a very common fruit is quite common in everyday philosophy too, I guess. Like the saying “an apple a day keeps a doctor away”, describing beauty as the “Apple of one’s eye”, Steve Jobs, New York City, Newton’s Theory of Gravitational pull, the original sin etc. A lot of things, basically. All these were anything but literal, except for a few, I thought, till a brief visit to the super market near my place.

It was a Saturday evening. Just a few days earlier I had studied the concept of polymorphism in my programming language which is about how an object can behave in different ways. Just like how the one supreme entity is said to have taken up 10 different avatars (9 till now...). I studied various examples that could illustrate the property of polymorphism. But, after my visit to the supermarket, none of the examples stood a chance. The grocery section perfectly illustrated the concept.

"Green" Apples in Red. Probably Santa paid them a visit

I didn't know Sweet Lime was a kind of an apple

Sheer Brilliance in the naming. Its Pome-granate!
About the Grapes, I don't know, i guess they are kind of apples too

I'd say Kamal Haasan has got a lot to learn from apples…


Jayaprasad said...

Ha ha... Really nice....

Wandering Mystique said...

hahaha!!! ingenious nomenclature :) which place is this?

Vibushan Lakshminarayan said...

Thanks :)
@Wandering Mystique
Which place? well, its the hills :) hope you get it :D

Hari said...

Hahaha, good one!

But that theory of polymorphism kinda intrigued me. I have this strong urge to believe that Avvaiyar laid the first stone into building the theory behind it all when she called Murugan (whose rip-off in today's age is a 6-year old called Calvin) a Pazham. Then she called him a Gyana Pazham. And then a Tamizh Gyana Pazham. That makes 3 overloads for Pazham. And then there are people like us... ;)

Vibushan Lakshminarayan said...

Ha ha :) Witty! well, Is that an overload on the pazham or the homosapien?:D I'd say, here Pazham is the base/abstract class and Murugan has inherited the common functions from it :D and so have other people in the pazham category :D

Hema Hariharan said...

Grapes Paneer?! :D What sort of a supermarket is this? :D

Vibushan Lakshminarayan said...

@Hema Hariharan
Was that the only thing that caught your attention?! ;) LOL :D
Anyway, if Apples can be grapes, so can grapes be a kind of paneer ;)

Hari said...

A very abstract theory indeed, could you please take up a class to extend it? :D

Vibushan Lakshminarayan said...

Ha ha ha :D :D well said :D sometimes training can send us overboard! :D :D

Vivek said...

I knew the apple would cause man's downfall!
'Pome' granate - Brilliant! (Now thats real polymorphism)
Every fruit is an interface that can be implemented or is tat extended?
I forget. :D
Lets just say this post of a certain class that SHOULD be inherited for future posting.

Vibushan Lakshminarayan said...

Actually, the base class is pazham. Apple and other fruits are objects of it. Homosapiens is another class that inherits pazham class publicly. As we have common fuctions such as the turning_into_pazham() function which is more overloaded as the return type is either people or fruit, we have the base class pazham to be abstract and the function to be overridden. ;) LOL :D

:D :D :D
Apple everywhere :)

Hari said...

@ Vivek:

"Lets just say this post of a certain class that SHOULD be inherited for future posting."

If what you said is FINAL, then I am sorry inheritance is impossible


Rakesh Vanamali said...

Lol! I'm reminded of a class 4 lesson in English that talked about a person who renamed objects and got totally lost in the process..... ffor instance, he called a chair a table, a cat a dog and so on.......

Vibushan Lakshminarayan said...

@Vivek & Hari
Yes, Inheritance is impossible because I have declared the class to be protected so its valid only for my own namespaces muahahahahaha :D :D :D

Vibushan Lakshminarayan said...

I'm remembered of Phoebe from F.R.I.E.N.D.S where she thinks her cat is actually her mom :D

Rakesh Vanamali said...

Dear Vibu

Wishing you a very happy and prosperous new year!

May the coming year bring to you, the best yet!

Warm Regards


RukmaniRam said...

grapes paneer? which place is this?

Vibushan Lakshminarayan said...

Lets just call it a supermarket and a place that I visit often :)

RukmaniRam said...

it struck me only now that that was supposed to be "panneer drakshai".. and that make it so much more funeer

Vibushan Lakshminarayan said...

Ha ha ha :D Thats a nice one :) I guess, a lot of times, the luiteral translation might just hel you to solve a puzzle here :D