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=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,f868292008c639ce X-Google-Attributes: gid103376,public From: dale Subject: Re: C vs. Ada - strings Date: 2000/05/19 Message-ID: #1/1 X-Deja-AN: 625207782 References: <390F0D93.F835FAD9@ftw.rsc.raytheon.com> <8en5o9$ihe$1@nnrp1.deja.com> <8eonos$e70$1@wanadoo.fr> <1fIU4.4668$Rx3.250161@typhoon.nyroc.rr.com> X-Trace: 19 May 2000 10:12:59 GMT, dale.cs.rmit.edu.au Organization: rmit User-Agent: MT-NewsWatcher/3.0 (PPC) Newsgroups: comp.lang.ada Date: 2000-05-19T00:00:00+00:00 List-Id: Robert A Duff wrote: > > Yes, but with this simplicity you get a very real problem - the > > inability to define new distinct numeric types. > > I don't agree. It's quite easy to design a language in which it is > possible to define convenient output procedures, and still have multiple > user-defined integer types. And I don't mean by making all the output > primitives built-in, either (as in Pascal) -- I/O should be done in > library packages, not as built-in primitives. I was really just restricting myself to commenting on Java, rather than making a more generalised statment on language design (i.e. _if_ you choose Java, you don't get to define distinct numeric types). I hadn't thought about getting I/O "for free" (i.e. no instantiation) in a language which permitted multiple distinct integer types (I presume this is what you are saying). > > Note that you could always include your own package of functions > > to get exactly the same behaviour as you see above in Java. > > I don't see how. Not if you have lots of user-defined integer types -- > you have to declare something extra for every integer type, which does > not match the convenience of the Java routines. Again i was only comparing this to Java. If you want to restrict yourself to the primitives that Java provides, then you can easily make a package that implements "+" functions to make concatenation easier. Dale