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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,7f2ce8bda9cae4ab X-Google-Attributes: gid103376,public Path: controlnews3.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Dmitry A. Kazakov Newsgroups: comp.lang.ada Subject: Re: "Must instantiate controlled types at library level." Why? Date: Tue, 18 May 2004 10:27:08 +0200 Message-ID: References: <1mbha09eg9amttqgidkj4j4efm0e81o55d@4ax.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de GcbQUOxQGiEKuaVBz0SSEACKAYHkOiR740Zik46ylguopwwes= X-Newsreader: Forte Agent 1.8/32.548 Xref: controlnews3.google.com comp.lang.ada:661 Date: 2004-05-18T10:27:08+02:00 List-Id: On Mon, 17 May 2004 17:50:23 +0100, "Marius Amado Alves" wrote: >I associate first-class citizenship with being an object. This is a view on a program, not language. It is a valid view. However what was meant is not the objects one can operate, but built-in vs. derived ones. >For example, in most languages (including Ada), types are NOT first-class >citizens. Yes, if you support my view on generics as foreign substances! (:-)) Otherwise, types become first-class objects when they appear as the parameters of generic instantiations. Also do not forget that some attributes take types as parameters. Because Ada allows to override *some* attributes, one should probably count *all* attributes as subroutines. >In languages with a MOP (Meta-Object Protocol), e.g. Smalltalk, types ARE >first-class citizens. Yes. Though it is a question which approach is better. Presently it is very difficult to get even "object" ADT right. If you want to make types objects, you should evolve type ADT. Of course you might hope that the ADT working with normal values, would also do with type values. But from what we know now, it seems that "type arithmetic" is very different. So I do not believe that one could manage values, type values, type type values etc within the same framework. >In most prototype-based languages (e.g. Io) everything is an object. This is a delusion. In any language there should be things one cannot operate. >Being an object meaning loosely that it can be passed around, inspected, >changed, copied, read, written, put in a container etc., especially at run >time. > >For example, in Ada, every now and then a you need to print the component >names of a record. You cannot extract them programmatically, because they >aren't first class. Probably we should distinguish n-class and non-existent objects. (:-)) -- Regards, Dmitry Kazakov www.dmitry-kazakov.de