Re: [Tutor] [Slightly OT] Inheritance, Polymorphism and Encapsulation

2007-09-19 Thread Kent Johnson
Alan Gauld wrote: > What I was referring to was the lack of any kind of class > structure at all, a purely prototype driven OOP style. > (Somewhat like JavaScript OOP except that it's very easy > to fake classes in JavaScript) Wikipedia has an article about prototype-based programming: http://

Re: [Tutor] [Slightly OT] Inheritance, Polymorphism and Encapsulation

2007-09-19 Thread Stephen Nelson-Smith
On 9/19/07, Michael Langford <[EMAIL PROTECTED]> wrote: > I do think this is a good question for getting a sense of where a > person's understanding is. I wonder how much this understanding is a > pre-requistite for being a good developer... not too much I hope! > > A good developer is a very load

Re: [Tutor] [Slightly OT] Inheritance, Polymorphism and Encapsulation

2007-09-19 Thread Alan Gauld
"Michael Langford" <[EMAIL PROTECTED]> wrote > OOP without classes is quite common still. This is how a > good portion of the Linux kernel is written True, but as I understand it the Linux approach is to use C structs to mimic some class type behaviour. Essentially binding data and functions

Re: [Tutor] [Slightly OT] Inheritance, Polymorphism and Encapsulation

2007-09-19 Thread Michael Langford
I do think this is a good question for getting a sense of where a person's understanding is. I wonder how much this understanding is a pre-requistite for being a good developer... not too much I hope! A good developer is a very loaded term. :o) There are a lot of good programmers who are bad dev

Re: [Tutor] [Slightly OT] Inheritance, Polymorphism and Encapsulation

2007-09-19 Thread Alan Gauld
"Stephen Nelson-Smith" <[EMAIL PROTECTED]> wrote > I do think this is a good question for getting a sense of where a > person's understanding is. I wonder how much this understanding is > a > pre-requistite for being a good developer... not too much I hope! To use classes/objects yuou don;t ne

Re: [Tutor] [Slightly OT] Inheritance, Polymorphism and Encapsulation

2007-09-19 Thread Michael Langford
(*)BTW Its also possible to do OOP without classes! This is not often seen nowadays but there were several OOP languages in the 70's and 80's that explored that route. Scheme is probably the best known. Its a very different kind of OOP of course but the basic concepts are all there. OOP without cl

Re: [Tutor] [Slightly OT] Inheritance, Polymorphism and Encapsulation

2007-09-19 Thread Alan Gauld
"Michael Langford" <[EMAIL PROTECTED]> wrote Good stuff on inheritance and polymorphism snipped... > Encapsulation: The process of taking what shouldn't matter to > the external world, and locking it behind an interface. Actually I'd call that Abstraction. Encapsulation literally means taking

Re: [Tutor] [Slightly OT] Inheritance, Polymorphism and Encapsulation

2007-09-19 Thread Alan Gauld
"Ricardo Aráoz" <[EMAIL PROTECTED]> wrote> > Encapsulation comes with OO - you get it for free. > > Encapsulation does not come with OO. It is something you must code > in > your classes. This depends on your definition of encapsulation. Many modern texts use a definition of encapsulation that r

Re: [Tutor] [Slightly OT] Inheritance, Polymorphism and Encapsulation

2007-09-19 Thread Alan Gauld
"Stephen Nelson-Smith" <[EMAIL PROTECTED]> wrote > "Place the following three in order: Inheritance, Polymorphism, > Encapsulation." Interesting exercise! > Encapsulation comes with OO - you get it for free. It comes with OO but not for free. It is a fundamental property of OOP languages, but

Re: [Tutor] [Slightly OT] Inheritance, Polymorphism and Encapsulation

2007-09-18 Thread Stephen Nelson-Smith
Michael Langford wrote: > Inheritance: Syntactic sugar that's not really needed to make a well > organized system. Often overused, especially by programmers in big > companies, beginning students of programmers, green engineers, and > professors. In practice hides a lot of data, often making behav

Re: [Tutor] [Slightly OT] Inheritance, Polymorphism and Encapsulation

2007-09-18 Thread Michael Langford
> "Place the following three in order: Inheritance, Polymorphism, Encapsulation." Inheritance: Syntactic sugar that's not really needed to make a well organized system. Often overused, especially by programmers in big companies, beginning students of programmers, green engineers, and professors. I

Re: [Tutor] [Slightly OT] Inheritance, Polymorphism and Encapsulation

2007-09-18 Thread Ricardo Aráoz
Stephen Nelson-Smith wrote: > Hello friends, > > Over lunch today some colleagues discussed a question they are using > as a conversation starter in some preliminary chats in our developer > hiring process. > > The question was: > > "Place the following three in order: Inheritance, Polymorphism,

Re: [Tutor] [Slightly OT] Inheritance, Polymorphism and Encapsulation

2007-09-18 Thread Ian Witham
On 9/19/07, Stephen Nelson-Smith <[EMAIL PROTECTED]> wrote: > > > "Place the following three in order: Inheritance, Polymorphism, > Encapsulation." > > They specifically did not define in *what* order, leaving that for > the answerer to decide. > I would place them in alphabetical order. BTW, the

[Tutor] [Slightly OT] Inheritance, Polymorphism and Encapsulation

2007-09-18 Thread Stephen Nelson-Smith
Hello friends, Over lunch today some colleagues discussed a question they are using as a conversation starter in some preliminary chats in our developer hiring process. The question was: "Place the following three in order: Inheritance, Polymorphism, Encapsulation." They specifically did not de