synonyms
Richard Gaskin
ambassador at fourthworld.com
Thu Jun 29 16:00:24 EDT 2017
Bob Sneidar wrote:
> On Jun 29, 2017, at 10:33 , Richard Gaskin wrote:
>>
>> > put "chart" into tType
>> > put "100" into tSize
>> > doSomething tType, tSize
>>
>> That's not a one-liner. That's three lines. :)
>>
>> The call itself is indeed only one line, but to prep the args for the
>> call requires as many additional lines as there are args.
...
> put "chart" into tType ; put "100" into tSize ; doSomething tType,
> tSize
>
> That is a one liner too.
Not in this context. In programming, a "line" is generally understood
to be referring to a statement. Whether the statements are separated by
0x10 or 0x59 is less the point than that a lot more typing is happening.
> So what? Are we averse to carriage returns?
No, just typing in general. :)
The array example about is about 70 keystrokes, while this:
doSomething type="chart" size="100"
...is about half as many.
With just two args it doesn't matter much.
But once we start looking at the scope of args supported by rich
functions like R's plot command or Hugh Senior's great ChartMaker the
additional typing can add up very significantly.
> If it's that big a deal someone could write a function that takes
> doSomething type="chart" size="100"
> and converts it
That's pretty much what this thread is about.
> to:
> doSomething put "chart" into type ; put "100" into size ; doSomething
> type, size
> and then replaces it in your script editor with a hotkey. I just think
> the whole thing is majoring in the minors.
Preprocessing. I like it. Could be good. Let's call that Option 5. :)
> I suppose lots of things are possible in other languages. Are we
> trying to be just like all the other languages?
Like I said, I'm not at all married to the idea of having named params
in LC. If Mark Waddingham were to show up here and say, "I changed my
mind, let's do it!" I'd happily use them, but I've gotten along well
enough without them all these years that their absence isn't stopping me
from shipping anything.
What I find interesting about this thread is discovering the range of
use cases others have in mind for named param. All this time I thought
I was alone in finding them useful. Good ideas have shown up here.
Whether named params or something else, personally I'm glad the language
grows with new features from time to time.
Those of us using xTalks from the beginning remember that we spent about
half our working lives without arrays, and had to wait nearly half a
decade for SuperCard to deliver the first xTalk implementation of custom
properties.
Today, I can't imagine trying to get my work done without either of those.
Sometimes even sprawling discussions like this one give rise to ideas
that later become valuable features.
Other times they become useful libraries, or additions to Master Library.
And sometimes it's just entertainment.
But there are worse ways to enjoy oneself than to explore new directions
in scripting language design among friends.
--
Richard Gaskin
Fourth World Systems
Software Design and Development for the Desktop, Mobile, and the Web
____________________________________________________________________
Ambassador at FourthWorld.com http://www.FourthWorld.com
More information about the use-livecode
mailing list