Path: csiph.com!weretis.net!feeder6.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end From: "Luke A. Guest" Newsgroups: comp.compilers Subject: Re: Languages with types like Ada Date: Sat, 22 Oct 2022 21:22:31 +0100 Organization: Aioe.org NNTP Server Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <22-10-047@comp.compilers> References: <22-10-034@comp.compilers> <22-10-044@comp.compilers> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="86037"; mail-complaints-to="abuse@iecc.com" Keywords: types, comment Posted-Date: 22 Oct 2022 22:46:09 EDT X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com Xref: csiph.com comp.compilers:3217 On 22/10/2022 17:17, Bo Persson wrote: > 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. But in Ada, you're supposed to model your types to the domain, unlike all the other languages which use machine types, int, i32, etc. On 22/10/2022 13:30, Thomas F. Burdick wrote: > Have you looked at the typed functional languages (SML/OCaml, Haskell)? If > you're looking for a maximum amount of information expressed via types, > dependent types do that: Idris and Agda would be the languages to check out > there. ... I'm wanting to know if there are any other languages which move away from the machine types, int, short, long, i32, i64, etc. and implement these types like in Ada, where you model the data, range, size, bit order, etc. [PL/I does that attribute stuff but two types with the same attributes are the same. -John]