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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,81bb2ce65a3240c3 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.136.33 with SMTP id px1mr9219129pbb.7.1336372386175; Sun, 06 May 2012 23:33:06 -0700 (PDT) Path: pr3ni13415pbb.0!nntp.google.com!news2.google.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail From: ytomino Newsgroups: comp.lang.ada Subject: Re: What would you like in Ada202X? Date: Sun, 6 May 2012 23:33:05 -0700 (PDT) Organization: http://groups.google.com Message-ID: <20780405.1069.1336372385458.JavaMail.geo-discussion-forums@pbkc8> References: <3637793.35.1335340026327.JavaMail.geo-discussion-forums@ynfi5> NNTP-Posting-Host: 60.39.70.195 Mime-Version: 1.0 X-Trace: posting.google.com 1336372386 1744 127.0.0.1 (7 May 2012 06:33:06 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 7 May 2012 06:33:06 +0000 (UTC) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=60.39.70.195; posting-account=Mi71UQoAAACnFhXo1NVxPlurinchtkIj User-Agent: G2/1.0 Content-Type: text/plain; charset=ISO-8859-1 Date: 2012-05-06T23:33:05-07:00 List-Id: It's interesting. What would happen to 'Pos and 'Val ? > type Message_Kind1 is (Sign_On, Request, Reply, Sign_Off); > type Detailed_Message_Kind is new Message_Kind1 with ( > Request => (Read, Write), > Reply => (Data, Ack, Refused), > others => <>); First, Message_Kind1'Pos (Sign_On) = 1, Request = 2, Reply = 3, Sign_Off = 4, of course. I think... 1) To keep order, Detailed_Message_Kind'Pos (Read) = 2, Write = 2.5 (float!) 2) To keep as integer, Detailed_Message_Kind'Pos (Read) = 2, Write = 5 3) Simple adding, Detailed_Message_Kind'Pos (Read) = 5, Write = 6 4) Reassign, Detailed_Message_Kind'Pos (Read) = 2, Write = 3, Data = 4, ..., Sign_Off = 7 Which do you intend? It seems difficult to realize keeping operator "<", ">" and keeping Message_Kind1'Pos (X) = Detailed_Message_Kind'Pos (X) at same time. And it's unclear about representation of "array (Detailed_Message_Kind) of ...". However, I too want to use this extensible enum if you have a nice solution.