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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.236.87.73 with SMTP id x49mr14172622yhe.30.1401763469769; Mon, 02 Jun 2014 19:44:29 -0700 (PDT) Path: border1.nntp.dca.giganews.com!nntp.giganews.com!j5no692657qaq.1!news-out.google.com!k18ni1741qav.1!nntp.google.com!peer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post02.iad.highwinds-media.com!fx10.iad.POSTED!not-for-mail From: Shark8 User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:32.0) Gecko/20100101 Thunderbird/32.0a1 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Style Question: normal record vs discriminated null-record. Message-ID: X-Complaints-To: abuse@teranews.com NNTP-Posting-Date: Tue, 03 Jun 2014 02:44:29 UTC Organization: TeraNews.com Date: Mon, 02 Jun 2014 20:44:24 -0600 X-Received-Bytes: 1197 X-Received-Body-CRC: 655876097 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Original-Bytes: 1218 Xref: number.nntp.dca.giganews.com comp.lang.ada:186709 Date: 2014-06-02T20:44:24-06:00 List-Id: Ok, given some sort of alert-system (meaning there shouldn't be any/much in the way of value manipulation of those objects) is it preferable to use a discriminated null-record or a record with normal components? Type Grievousness is (Warning, Error); Type Circumstance is (Expired_Data, Bad_Request, Malformed_Data); Type Alert_1(Severity : Grievousness; Condition : Circumstance) is null record; Type Alert_2 is record Severity : Grievousness; Condition : Circumstance; end record;