From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,INVALID_MSGID, SUBJ_ALL_CAPS autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1089ad,2e03bc978c29ea47 X-Google-Attributes: gid1089ad,public X-Google-Thread: 103376,2e03bc978c29ea47 X-Google-Attributes: gid103376,public From: dewar@cs.nyu.edu (Robert Dewar) Subject: Re: ADA - VHDL Date: 1996/07/11 Message-ID: #1/1 X-Deja-AN: 168312794 references: <31E2391F.A16BEBD@sh.bel.alcatel.be> organization: Courant Institute of Mathematical Sciences newsgroups: comp.lang.ada,comp.lang.vhdl Date: 1996-07-11T00:00:00+00:00 List-Id: Peter said "I agree there are a lot of similarities between the languages, but I do not understand the reason for many differences. There are things which I can not do in VHDL which I can in ADA and for which I see no reason. some examples: type new Integer; generics; variant records" These are all fundamental features of Ada that provide very important expressive power (I don't know VHDL well enough to comment on how it can manage without these critical features, or how one works around the absence). Probably the easiest way to understand these features is to read a book like Barnes, although the original Ada 83 rationale is also a good souce of information if you want to concentrate on the *why* rather than the *what*. Very briefly: derived types allow separation of type spaces (new integer for example generates a type different from integer, so that the compiler can check improper operations like assigning a temperature to a distance. generics are a fundamental feature in any language. C++ at first lacked this capability, and it was added in the form of templates. There are many things that generics do, but most critically they allow type parametrization of reusable components. variant records are discriminanted unions, as found in say Pascal. Some kind of union facility is essential if you have recursive data structures (to end the recursion if it ends in a different type).