Thread overview | |||||||
---|---|---|---|---|---|---|---|
|
July 29, 2009 Properties -- another one that gets me | ||||
---|---|---|---|---|
| ||||
Just remembered this other real example of a D property that caused me discomfort: .transform I wanted it to be an unambiguous property that returns the transform of an object, but it's too easy to misinterpret as an action that transforms the object if it can be called as .transform(). --bb |
July 29, 2009 Re: Properties -- another one that gets me | ||||
---|---|---|---|---|
| ||||
Posted in reply to Bill Baxter | Bill Baxter escribió:
> Just remembered this other real example of a D property that caused me
> discomfort:
>
> .transform
>
> I wanted it to be an unambiguous property that returns the transform
> of an object, but it's too easy to misinterpret as an action that
> transforms the object if it can be called as
>
> .transform().
>
> --bb
Maybe we should start programming in another natural language and that's it.
|
July 29, 2009 Re: Properties -- another one that gets me | ||||
---|---|---|---|---|
| ||||
Posted in reply to Bill Baxter | Bill Baxter wrote:
> Just remembered this other real example of a D property that caused me discomfort:
>
> .transform
>
> I wanted it to be an unambiguous property that returns the transform of an object, but it's too easy to misinterpret as an action that transforms the object if it can be called as
>
> .transform().
>
> --bb
.transformed :)
|
July 29, 2009 Re: Properties -- another one that gets me | ||||
---|---|---|---|---|
| ||||
Posted in reply to downs | On Wed, Jul 29, 2009 at 8:11 AM, downs<default_357-line@yahoo.de> wrote: > Bill Baxter wrote: >> Just remembered this other real example of a D property that caused me discomfort: >> >> .transform >> >> I wanted it to be an unambiguous property that returns the transform of an object, but it's too easy to misinterpret as an action that transforms the object if it can be called as >> >> .transform(). >> >> --bb > > .transformed :) It returns the affine transform itself, not a transformed object. --bb |
July 29, 2009 Re: Properties -- another one that gets me | ||||
---|---|---|---|---|
| ||||
Posted in reply to Bill Baxter | Bill Baxter wrote:
> On Wed, Jul 29, 2009 at 8:11 AM, downs<default_357-line@yahoo.de> wrote:
>> Bill Baxter wrote:
>>> Just remembered this other real example of a D property that caused me discomfort:
>>>
>>> .transform
>>>
>>> I wanted it to be an unambiguous property that returns the transform of an object, but it's too easy to misinterpret as an action that transforms the object if it can be called as
>>>
>>> .transform().
>>>
>>> --bb
>> .transformed :)
>
> It returns the affine transform itself, not a transformed object.
>
> --bb
Oops. Not sure what I was thinking there.
|
Copyright © 1999-2021 by the D Language Foundation