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=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,aa7f494bf30adbc7 X-Google-Attributes: gid103376,public Path: g2news1.google.com!news1.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Roland Illig Newsgroups: comp.lang.ada Subject: Re: [newbie] simple(?) data structures Date: Sun, 13 Jun 2004 05:53:25 +0200 Message-ID: <2j21dlFrvu2sU1@uni-berlin.de> References: <2j1e30Fsrg8vU1@uni-berlin.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de pWoxuLNT1lw5N6Yj6Wl5fQ4TDbPhfcJhRppXnbC+GF1VVvDh0= User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040528 Debian/1.6-7 X-Accept-Language: de-de, de, en-us, en In-Reply-To: Xref: g2news1.google.com comp.lang.ada:1437 Date: 2004-06-13T05:53:25+02:00 List-Id: tmoran@acm.org wrote: > Why so complicated? Why not just: > type Go_Board is array(integer range <>,integer range <>) of Stone; > This_Board : Go_Board(1 .. 19, 1 .. 19); > That_Board : Go_Board(1 .. 13, 1 .. 13); > then directly access the array instead of getStone, and use > This_Board'length(1) instead of getHeight and This_Board'length(2) for getWidth That's too simple. :) Seriously, I want to build abstractions using Ada, not a thin layer above assembly language. And perhaps I want to later extend the type. Maybe with a move history. And I want to guarantee that a Go_Board is always as wide as high. Roland