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,1e3f2eac5c026e3 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-12-24 12:16:52 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: 18k11tm001@sneakemail.com (Russ) Newsgroups: comp.lang.ada Subject: Re: Other Ada Standards (was Re: SIGada Conference) Date: 24 Dec 2003 12:16:51 -0800 Organization: http://groups.google.com Message-ID: References: <468D78E4EE5C6A4093A4C00F29DF513D04B82B08@VS2.hdi.tvcabo> <3FE991DD.5060301@noplace.com> NNTP-Posting-Host: 63.194.87.148 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1072297011 25351 127.0.0.1 (24 Dec 2003 20:16:51 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 24 Dec 2003 20:16:51 +0000 (UTC) Xref: archiver1.google.com comp.lang.ada:3787 Date: 2003-12-24T12:16:51-08:00 List-Id: Marin David Condic wrote in message news:<3FE991DD.5060301@noplace.com>... > I think its all a tempest in a teapot. While there might be some small > convenience in some version of a "with and use", I don't see this as > something that is either fundamentally broken, adding some new major and > important capability or otherwise making the language significantly more > attractive to the non-Ada crowd. The time spent implementing and > verifying it could be better spent by adding new sublibraries to Ada > that gave the user more leverage. Which would people rather have: > > with and use My_Homegrown_Library_For_Tough_To_Get_Right_Math_Ops ; > > or > > with Ada.New_Math_Ops_Extensions_For_2005 ; > use Ada.New_Math_Ops_Extensions_For_2005 ; > > Personally, I'd rather have to type two lines of code (over and over > again, if necessary) than to develop my own matrix math, stats package, > operations research math, etc. Perhaps you could explain why you seem to think the two are mutually exclusive, because I don't get it. > Providing a bunch of pre-packaged math libraries with Ada would have the > advantage of a) being relatively easy to specify and test, b) fairly > straightforward to implement without hurting the compiler, and c) likely > to make the language more attractive to people who have to do > complicated math. Providing a "with and use" or "use implies with" is > likely to a) be tricky to get right without breaking something, b) > require fundamental changes to the compiler and c) not likely to make > that many people thrilled to be using Ada. I'd say "no brainer" but > that's just me. :-) I remember back to discussions on this forum about the efficiency of vector/matrix operations. Several folks insisted that Ada compilers are (or could easily be) "smart" enough to avoid the extra temporary objects and copying when using function-type operators such as "+". I suspect that some of them did not really understand the the problem. Now we swing over to the other extreme: something as trivial as "use" implying "with" is somehow too "tricky". I just don't see how or why. The rule could simply be that "use" implies "with" unless the implied "with" wouldn't compile, in which case "use" would *not* imply "with", and the programmer would be responsible for supplying the necessary "with". This rule would not break a single line of existing code, nor would it force any programmer to write a single line of code any different than if the rule were not in effect. And where is the difficulty for compiler writers? They need to check the validity of any "with" declaration anyway, don't they? What's the "tricky" part? I can see one potential technical flaw. If the implied "with" is too general, then I can understand why someone might oppose it. I don't think this is the case, but I am not 100% sure because I am not an Ada expert. Perhaps someone could clarify that. Would the implied "with" "drag in" more than is minimally necessary to compile the program? If not, I don't see any reasonable objection to it. Just out of curiousity, approximately what percentage of implied "with" declarations in actual practice wouldn't compile? Are we talking 25% or 0.1%?