Re: [dev] [OT]: Go programming language

From: Jessta <jessta_AT_gmail.com>
Date: Mon, 16 Nov 2009 21:25:08 +1100

On 16/11/2009, frederic <fdubois76_AT_gmail.com> wrote:
>> Go has no inheritance, and that is
>> basically the root of all OO evil (and inheritance is in mainstream
>> programming considered the defining characteristic of any OO
>> language.)
>>
>
> Why do you think inheritance is the root of all evil?
>
> That's an important issue, given that Go offers " ways to embed types
> in other types to provide something analogous—but not identical—to
> subclassing"
> [from "Effective Go"]

Infact not really like sub-classing at all.
Embeding is putting structs inside other structs and has nothing to do
with the methods associated with those structs. It's almost exactly
like you'd do it in C except a bit nicer.

The problem with inheritance has nothing to do with the data
structures and everything to do with the methods.

- Jessta

-- 
=====================
http://jessta.id.au
Received on Mon Nov 16 2009 - 10:25:08 UTC

This archive was generated by hypermail 2.2.0 : Mon Nov 16 2009 - 10:48:02 UTC