home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!snorkelwacker.mit.edu!ai-lab!life.ai.mit.edu!tmb
- From: tmb@arolla.idiap.ch (Thomas M. Breuel)
- Newsgroups: comp.lang.misc
- Subject: Re: how to advocate new software/hardware features (Re: Hardware Support for Numeric Algorithms)
- Followup-To: comp.lang.misc
- Date: 18 Nov 92 18:45:15
- Organization: IDIAP (Institut Dalle Molle d'Intelligence Artificielle
- Perceptive)
- Lines: 37
- Message-ID: <TMB.92Nov18184515@arolla.idiap.ch>
- References: <Bxr8vG.IpI@mentor.cc.purdue.edu> <1e775rINNslq@network.ucsd.edu>
- <TMB.92Nov16140138@arolla.idiap.ch> <BxtFoF.BGn@mentor.cc.pur
- <KERS.92Nov17090305@cdollin.hpl.hp.com>
- Reply-To: tmb@idiap.ch
- NNTP-Posting-Host: arolla.idiap.ch
- In-reply-to: kers@hplb.hpl.hp.com's message of 17 Nov 92 09:03:05 GMT
-
- In article <KERS.92Nov17090305@cdollin.hpl.hp.com> kers@hplb.hpl.hp.com (Chris Dollin) writes:
-
- In article ... tmb@arolla.idiap.ch (Thomas M. Breuel) writes:
-
- The problem is that user-defined operators cause problems about which
- the compiler cannot warn reliably. For the rationale and some examples
- of what can go wrong, see the ARM, p331.
-
- It says ``This extension, however, would imply a significant extension of
- complexity of syntax analysis and an uncertain gain in readability.'' It then
- remarks that precedence and associativity must either be fixed for all
- user-defined operators, or a mechanism must be present to define them; it is
- this latter that is the tricky point. (The ``complexity of syntax analysis''
- argument seems to be terribly weak, given that (a) Stroustrup is not stupid,
- and (b) the rest of C++.)
-
- It goes on to give several examples that behave rather unexpectedly.
- Also, I think by "complexity" he means "difficulty of bringing the
- user's expectations in line with what the language actually does",
- rather than speed.
-
- There are many other things compilers cannot warn about reliably, or indeed, at all;
-
- So, let's not increase the number of cases in which this can happen.
-
- writing ``-'' when one meant ``+'', forgetting to increment a counter,
- calling the wrong function (or not calling the right one), writing ``0'' when
- style demands FALSE or NULL_String, and so on. Has anyone done some *research*
- on the issue, rather than making *-informed speculation?
-
- That's a question of psychology and taste. I don't think I have
- speculated (informedly or uninformedly) about your tastes in
- particular. But I think it is fair to point out that the fact that
- modern programming languages severely limit user-defined syntactic
- extensions is probably a reflection of common needs and tastes.
-
- Thomas.
-