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.2 required=5.0 tests=BAYES_00,PLING_QUERY, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,b6d862eabdeb1fc4 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!feeder2.cambriumusenet.nl!feed.tweaknews.nl!193.201.147.80.MISMATCH!news.astraweb.com!border3.a.newsrouter.astraweb.com!news.netcologne.de!ramfeed1.netcologne.de!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Ada noob here! Is Ada widely used? Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <0e88de66-128c-48fd-9b9f-fdb4357f318a@z17g2000vbd.googlegroups.com> Date: Sun, 6 Jun 2010 09:39:19 +0200 Message-ID: NNTP-Posting-Date: 06 Jun 2010 09:39:18 CEST NNTP-Posting-Host: acda5125.newsspool3.arcor-online.net X-Trace: DXC=67jOJP@5VkS1`E>oC;JXEZMcF=Q^Z^V3X4Fo<]lROoRQ8kF On Sat, 5 Jun 2010 14:16:42 -0700 (PDT), Maciej Sobczak wrote: > On 5 Cze, 14:59, "Dmitry A. Kazakov" > wrote: > >> As for different types of the real and imaginary parts, it would make >> little or no sense because you can "rotate" numbers by multiplying them to >> exp(j*angle). > > Nobody said that such a "rotation" must make sense in every single > application domain. If it does not make sense in a given domain, then > it does not have to be supported. No, in this case the domain is set, it the complex field. > I can perfectly imagine a domain where only the addition/substraction > operation for complex and multiplying/dividing complex by scalar are > necessary. Yes, that would be a different model of complex numbers. But the same argument applies to any numerical type. There may be cases where floating-point is unsuitable. >> So the complex space must be isotropic > > So it does not have to be and Ada, as a language that promotes careful > selection of types for the given purpose, would be more consistent by > allowing separate base types for both components. Polar representations were far more useful, or complex intervals (rectangular, elliptic), to name some. > Otherwise the model is simplified. Not necessarily bad, but certainly > simplified. You cannot have a model for each case. This is why I keep on arguing for a better type system, where you could define your own models implementing abstract classes like, in this case, complex field. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de