Re: Languages with types like Ada

Bo Persson <bo@bo-persson.se>
Sat, 22 Oct 2022 18:17:58 +0200

          From comp.compilers

Related articles
Languages with types like Ada laguest@archeia.com (Luke A. Guest) (2022-10-20)
Re: Languages with types like Ada antispam@math.uni.wroc.pl (2022-10-21)
Re: Languages with types like Ada laguest@archeia.com (Luke A. Guest) (2022-10-21)
Re: Languages with types like Ada gah4@u.washington.edu (gah4) (2022-10-21)
Re: Languages with types like Ada DrDiettrich1@netscape.net (Hans-Peter Diettrich) (2022-10-22)
Re: Languages with types like Ada thomas@burdick.fr (Thomas F. Burdick) (2022-10-22)
Re: Languages with types like Ada bo@bo-persson.se (Bo Persson) (2022-10-22)
Re: Languages with types like Ada laguest@archeia.com (Luke A. Guest) (2022-10-22)
Re: Languages with types like Ada christopher.f.clark@compiler-resources.com (Christopher F Clark) (2022-10-23)
Re: Languages with types like Ada laguest@archeia.com (Luke A. Guest) (2022-10-23)
Re: Languages with types like Ada a.rumpf@crosssoft.de (Andreas Rumpf) (2022-11-07)
| List of all articles for this month |

From: Bo Persson <bo@bo-persson.se>
Newsgroups: comp.compilers
Date: Sat, 22 Oct 2022 18:17:58 +0200
Organization: Compilers Central
References: 22-10-034 22-10-037 22-10-038
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="60016"; mail-complaints-to="abuse@iecc.com"
Keywords: types, question
Posted-Date: 22 Oct 2022 14:49:55 EDT

On 2022-10-21 at 22:00, Luke A. Guest wrote:
> On 21/10/2022 13:30, antispam@math.uni.wroc.pl wrote:
>> Luke A. Guest <laguest@archeia.com> wrote:
>>> I've been using Ada for a while and I cannot seem to find any other
>>> languages which were developed which had a similar/same way of embedding
>>> information into types (including basic discrete types). Are there any? ...
> No, I could write an Ada compiler, but the language is massive and needs
> cutting down, the ARG won't do that, so a smaller language with the bits
> I want and bits I don't removed is a better way forward.
> [In C you can say "typedef short int foo" and now foo is a type.
> Like that? -John]


But in C foo is still the same type as short, just with a new name.


In Ada you can say 'type foo is new integer' and foo is now just *like*
an integer, but a distinct type with no auto conversions.


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.