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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,73cb216d191f0fef X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit X-Received: by 10.180.20.239 with SMTP id q15mr1242431wie.7.1364343948059; Tue, 26 Mar 2013 17:25:48 -0700 (PDT) Path: p18ni19746wiv.0!nntp.google.com!feeder1.cambriumusenet.nl!feed.tweaknews.nl!85.12.40.130.MISMATCH!xlned.com!feeder1.xlned.com!border2.nntp.ams.giganews.com!border2.nntp.dca.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsgate.cuhk.edu.hk!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Is this expected behavior or not Date: Tue, 19 Mar 2013 09:53:51 +0100 Organization: cbb software GmbH Message-ID: <1nqlziyc04gkx$.9vn430ls58x$.dlg@40tude.net> References: <51408e81$0$6577$9b4e6d93@newsspool3.arcor-online.net> <11rcs3gg4taww$.bylek8fsshyz$.dlg@40tude.net> <99929f93-b80f-47c3-8a37-c81002733754@googlegroups.com> <87ec4b1d-f7cd-49a4-8cff-d44aeb76a1ad@googlegroups.com> <78103a2f-5d19-4378-b211-1917175d5694@googlegroups.com> <3p6p8k0yfly7.ctazdw7fc5so$.dlg@40tude.net> <1jtvzi1v65aqm.1k5ejsveno59f.dlg@40tude.net> <1hvv2kd9smnfx.6spgz9thd1mh$.dlg@40tude.net> <8dd0f631-2e94-48e4-8bd0-ace1ae36a0de@googlegroups.com> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: FbOMkhMtVLVmu7IwBnt1tw.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Date: 2013-03-19T09:53:51+01:00 List-Id: On Mon, 18 Mar 2013 17:38:34 -0700 (PDT), Shark8 wrote: > On Sunday, March 17, 2013 3:36:19 AM UTC-6, Dmitry A. Kazakov wrote: >> On Sat, 16 Mar 2013 14:51:58 -0700 (PDT), Shark8 wrote: >> >>> I think it's rather a shame that the compile-time computation aspect of >>> generics is not emphasized a bit more >> >> You need no generics in order to compute something statically. Yes Ada >> could be much better with an ability to declare a function static or >> conditionally static. > > You misunderstand me; I wasn't saying that generics were required for > compile-time computation, but that their use in compile-time computation > is an interesting topic. Surely it is, especially for static checks/constraints defined by the user as it would be necessary for dimensioned arithmetic, matrix calculus etc. > (For example you could make a solar-system > simulator by making 'orbit' a generic with the parameters cooresponding to > Kepler's laws of motion.) Again, you don't need generics that. If you want "laws" be parameter bundle them into an interface. Generics/templates/preprocessor have no other purpose than to cover work around deficiencies of the language type system, premature optimization, lack of abstraction means. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de