July 27, 2005 Re: More bad D links | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ben Hinkle | "Ben Hinkle" <bhinkle@mathworks.com> wrote:
[...]
> But why would a top-level function (or a nested function in a top-level function) be considered a property? I'm tempted to say the current behavior is a bug.
[...]
Hmm, lets drive that to the limits:
<code>
f= g;
</code>
What is the effect of this assignment, if f and g are both function variables of the same type and in addition f and g have this type as a parameter and as a return value?
I know that there are currently restrictions on this example. But are this restrictions somehow natural --- or do they hinder general solutions, i.e. cripple D in an unnecessary way.
-manfred
|
August 06, 2005 Re: More bad D links | ||||
---|---|---|---|---|
| ||||
Posted in reply to Manfred Nowak | Manfred Nowak wrote: > "Ben Hinkle" <bhinkle@mathworks.com> wrote: > > [...] > >> But why would a top-level function (or a nested function in a top-level function) be considered a property? I'm tempted to say the current behavior is a bug. > > [...] > > Hmm, lets drive that to the limits: > > <code> > f= g; > </code> > > What is the effect of this assignment, if f and g are both function variables of the same type If they are function _variables_, then f will be made a reference to the same function as g is. If f and g are the actual names of functions, OTOH, then the code is equivalent to f(g()); > and in addition f and g have this type as a parameter and as a return > value? <snip> Hmm ... do recursive types work in D? I'll have to check.... Stewart. -- My e-mail is valid but not my primary mailbox. Please keep replies on on the 'group where everyone may benefit. |
Copyright © 1999-2021 by the D Language Foundation