TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy

TEAM-ADA@LISTSERV.ACM.ORG

Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Reply To:
Alexandre E. Kopilovitch
Date:
Fri, 14 Feb 2003 02:11:21 +0300
Content-Type:
text/plain
Parts/Attachments:
text/plain (12 lines)
>I consider Ada packages as static (non-instantiable) classes, where children
>inherits their static nature.
>  Does that make sense ?
Too narrow sense. Although you do not instantiate non-generic packages (if you
do not treat "with" clause as a kind of instantiation), you may instantiate
new types from them, deriving from private types declared in those packages.
  Look at the difference between "new" in C++ and "new" in Ada. "new" in C++
is run-time action, which produces new copy of object of the class, while
"new" in Ada is compile-time action, which produces new type, and that new
type is neither subtype nor supertype of original type... but it is defined
by the same package as the original type.

ATOM RSS1 RSS2