Re: constructors not inherited ?

From: Dale King (kingd[at]tmicha[dot]net)
Date: 03/08/04


Date: Mon, 8 Mar 2004 15:11:22 -0500


"chris sennitt" <csennitt@nospamblueyonder.co.uk> wrote in message
news:mNi2c.12$0l3.1@news-binary.blueyonder.co.uk...
>
> "Joona I Palaste" said
> > I think you are right, constructors are not implicitly inherited. But
> > why should they be? They're only ever called when creating a new object,
> > and then you have to know the correct class anyway.
>
> i can think of many examples in other oop langauges i have used

What languages are you talking about? It certainly is not true of C++.

--
  Dale King


Relevant Pages

  • Re: RAD vs. performance
    ... Just get rid of the need for type constructors and allow for similar ... Yet almost all modern languages disallow implicit variable declaration. ... could an IDE highlight erroneous declarations? ... I've never seen an IDE that would help with implicit casting bugs. ...
    (comp.lang.misc)
  • Re: Rationale for C++/CLI Value Types not having a default constructor
    ... C# doesn't support default constructors for value types either. ... The CLR itself doesn't support default and copy constructors for value types. ... Only those internal types can't be used from any other module, they're private, just like the x86 code generated by a native C++ compiler. ... Anything is doable in private code, but you won't be able to make that public and use that type from other DLLs and other languages. ...
    (microsoft.public.dotnet.languages.vc)
  • Re: throwing exception from constructor
    ... libraries we write in C# may get used by C++/CLI projects, or other languages ... that perhaps can't deal with exceptions in constructors as cleanly as C# can. ...
    (microsoft.public.dotnet.languages.csharp)