comp.lang.ada
 help / color / mirror / Atom feed
From: dsr@hector.UUCP (David S. Rosenblum)
Subject: Re: user-defined assignment
Date: 9 Dec 88 20:35:36 GMT	[thread overview]
Message-ID: <10984@ulysses.homer.nj.att.com> (raw)
In-Reply-To: 7943@aw.sei.cmu.edu

In article <7943@aw.sei.cmu.edu> firth@sei.cmu.edu (Robert Firth) writes:
|
|I don't want to become too embroiled in the current
|debate about user-defined assignment, but one serious
|misconception should, I feel, be corrected.
|
|The ability to use ":=" as a subprogram designator
|would in no way change the current strength or weakness
|of Ada's typing model.  The process of overload resolution
|would check actuals against formals, just as it does for,
|say, "+" at present.  Naturally, a malicious implementor
|could encode the body of ":=" so as to violate the typing
|rules, just as an implementor of "+" can today.

What "typing rules" of "+" can an implementor violate within his definition
of "+"?  I didn't know that the semantics of predefined "+" had any inherent
"typing rules" to violate.  As you say, the typing rules apply to parameters
of "+" and the return value of "+", as they do to all other subprogram
parameters and return values (e.g., in a user-defined ":=").  On the other
hand, as I understand ":=" it is restricted to copying a value of some type to
a variable of the SAME type, including a check that ALL subcomponents of the
target variable satisfy their respective constraints.  Aside from the rules
regarding implicit conversions of numeric values, I'm aware of no
rule (or AI) that sanctions a weakening of the behavior of ":=" as I've
(hastily) described it.  For example, I can "add", say, tasks to strings with
my own definition of "+".  This may violate some cherished notions about
addition, but I don't see that it "violates" any typing rules.  But with
overloaded ":=", I could assign tasks to strings; to me this violates typing
rules, as they currently apply to assignment.


-------------------------------------------------------------------
David Rosenblum			UUCP: {ucbvax, decvax}!ulysses!dsr
AT&T Bell Laboratories		ARPA: dsr@ulysses.att.com
600 Mountain Ave.		      dsr%ulysses@att.arpa
Murray Hill, NJ 07974-2070
(201) 582-2906
-------------------------------------------------------------------

  reply	other threads:[~1988-12-09 20:35 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1988-12-09 13:16 user-defined assignment Robert Firth
1988-12-09 20:35 ` David S. Rosenblum [this message]
  -- strict thread matches above, loose matches on Subject: below --
1992-10-16 11:58 User-defined assignment St ef Van Vlierberghe
1992-10-16 23:13 dog.ee.lbl.gov!hellgate.utah.edu!cs.utexas.edu!qt.cs.utexas.edu!news.Brow
1992-10-17 17:57 dog.ee.lbl.gov!hellgate.utah.edu!caen!malgudi.oar.net!zaphod.mps.ohio-sta
1992-10-17 23:32 Tucker Taft
1992-10-18 19:29 cis.ohio-state.edu!zaphod.mps.ohio-state.edu!darwin.sura.net!uvaarpa!soft
1992-10-19  7:31 Dag Bruck
1992-10-19  7:55 Dag Bruck
1992-10-19 14:13 Douglas N. Surber
1992-10-20 15:12 Rick Hudson
1992-10-21 23:42 dog.ee.lbl.gov!hellgate.utah.edu!caen!zaphod.mps.ohio-state.edu!rpi!bu.ed
1992-10-22 22:19 dog.ee.lbl.gov!hellgate.utah.edu!caen!zaphod.mps.ohio-state.edu!darwin.su
1992-10-29 18:20 Jack Beidler
1992-10-30  2:39 Alex Blakemore
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox