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,1116ece181be1aea X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-09-08 18:47:25 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news-out1.nntp.be!propagator2-sterling!news-in-sterling.nuthinbutnews.com!cyclone1.gnilink.net!spamkiller2.gnilink.net!nwrdny02.gnilink.net.POSTED!53ab2750!not-for-mail From: Hyman Rosen User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5b) Gecko/20030901 Thunderbird/0.2 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Is the Writing on the Wall for Ada? References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Date: Tue, 09 Sep 2003 01:47:24 GMT NNTP-Posting-Host: 162.84.176.54 X-Complaints-To: abuse@verizon.net X-Trace: nwrdny02.gnilink.net 1063072044 162.84.176.54 (Mon, 08 Sep 2003 21:47:24 EDT) NNTP-Posting-Date: Mon, 08 Sep 2003 21:47:24 EDT Xref: archiver1.google.com comp.lang.ada:42300 Date: 2003-09-09T01:47:24+00:00 List-Id: Russ wrote: > Suppose I want to take the sine of an angle in Java. Can I somehow set > things up so that I can simply write "sin(x)", or must I write > something like "math.sin(x)"? The former is acceptable to me, but the > latter is not. The latter generally. Also for cases like this, 'math' would be a class, not an object, and 'sin' would be a static method. If that's too odious, you can always do this: class MotherOfAnythingIWouldEverCall { double sin(double x) { return math.sin(x); } // etc. } class MyClass extends MotherOfAnythingIWouldEverCall { double f(double x) { return sin(sin(x)); } } But no one would do that. Just pretend you're using Ada in a shop that has forbidden use clauses.