[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Sc-devel] firstArg - why not valid for all objects?

Hmm... ok, firstArg passes into SendSpecialBinaryArithMsgX - seems unnecessary to me.

Why should it do this? What does the primitive do differently from this:

<! { |that| ^this }

... other than throw an unnecessary error?

Anyway, I'll just put <!! into my lib to avoid this nonsense.

On Feb 24, 2008, at 4:07 PM, James Harkins wrote:

I'm sure I've asked before and never gotten an answer, but... why is firstArg defined only for AbstractFunction, SequenceableCollection, Signal and SimpleNumber?

a - That leaves out a LOT of objects capable of doing math, e.g., Complex, Point...
b - It's more of a flow of control operator than a math operator anyway, so why restrict it to mathy objects?

I just ran into another situation where I had to write the inconvenient syntax

{ var ret = ~xyz;
~xyz = nil;

instead of the following, which expresses it much more cleanly imho -

{ ~xyz <! (~xyz = nil) }

Could someone either justify the restriction or give the go-ahead to lift it?


: H. James Harkins

: jamshark70@xxxxxxxxxxxxxxxxx

: http://www.dewdrop-world.net


"Come said the Muse,

Sing me a song no poet has yet chanted,

Sing me the universal."  -- Whitman