From: AES on
In article <i2eadd$q1l$1(a)smc.vnet.net>,
Murray Eisenberg <murray(a)math.umass.edu> wrote:

> Fewer keystrokes is not the sole metric for simplicity! Code readability
> is another.

Agreed!

Wasn't APL the classic example of a language with near-minimum
keystrokes, near-maximum unreadability? -- such that APL programs were
sometimes characterized as "write once, read never".

From: Mark McClure on
On Fri, Jul 23, 2010 at 7:09 AM, Kevin J. McCann <Kevin.McCann(a)umbc.edu> wrote:
> I'll agree that your example with the use of the Inner product is a clever
> way to do that, but isn't this way more readable?
>
> Graphics[{
> Red,PointSize[Large],Point[{0,0}],
> Blue,PointSize[Medium],Point[{1,0}]
> },
> AspectRatio->1/10]

Certainly, I'm not suggesting that one should use Inner and Directive
to place a couple of differently colored and sized dots in a picture!
I do a fair amount of graphics programming and, in that context, it
can be convenient to have a head that indicates Graphics directives.
Here's another example:

DeleteCases[Graphics[
{Directive[Red], Point[{0, 0}]}],
_Directive, Infinity]

This is a long winded way to create a single black dot. While not the
most efficient way to do it, this code indicates the kind of thing
that one might do if one always enclosed directives in the Directive
head.

Mark

From: Kevin J. McCann on
However, is Directive[Red,AbsoluteThickness[2]] really more readable
than {{Red,AbsoluteThickness[2]}}? I don't think so. Again, this seems
like very little, even if you prefer the former, for a new function to do.

Kevin

AES wrote:
> In article <i2eadd$q1l$1(a)smc.vnet.net>,
> Murray Eisenberg <murray(a)math.umass.edu> wrote:
>
>> Fewer keystrokes is not the sole metric for simplicity! Code readability
>> is another.
>
> Agreed!
>
> Wasn't APL the classic example of a language with near-minimum
> keystrokes, near-maximum unreadability? -- such that APL programs were
> sometimes characterized as "write once, read never".
>

From: Brett Champion on
On Jul 26, 2010, at 5:38 AM, Kevin J. McCann wrote:

> However, is Directive[Red,AbsoluteThickness[2]] really more readable
> than {{Red,AbsoluteThickness[2]}}? I don't think so. Again, this seems
> like very little, even if you prefer the former, for a new function
> to do.
>

It may not make a big difference for PlotStyle, but within some of the
newer options it does. For example, ChartStyle can use one more level
of grouping than PlotStyle, so you could have things like
{{{Red,Thick},...}}. In MeshShading you can get arbitrarily deep,
depending on the number of mesh functions you have.

As a developer, it is *very* convenient to not have distinguish List-
as-a-set and List-as-a-combination in the code. It means that I can
make decisions on a more local scale without needing to keep
information about what level I'm at.

As for ambiguity, consider that *for ages* the documented and
implemented behaviors of PlotStyle did not agree, at least for some
functions.

According to the old documentation [http://reference.wolfram.com/legacy/v4/RefGuide/PlotStyle.html
]

Plot[{x, -x}, {x, 0, 10}, PlotStyle -> {Thickness[0.02],Hue[1]}]

should have behaved as

Plot[{x, -x}, {x, 0, 10}, PlotStyle -> {{Thickness[0.02],Hue[1]}}]

instead of as

Plot[{x, -x}, {x, 0, 10}, PlotStyle -> {{Thickness[0.02]},{Hue[1]}}]


Brett

> Kevin
>
> AES wrote:
>> In article <i2eadd$q1l$1(a)smc.vnet.net>,
>> Murray Eisenberg <murray(a)math.umass.edu> wrote:
>>
>>> Fewer keystrokes is not the sole metric for simplicity! Code
>>> readability
>>> is another.
>>
>> Agreed!
>>
>> Wasn't APL the classic example of a language with near-minimum
>> keystrokes, near-maximum unreadability? -- such that APL programs
>> were
>> sometimes characterized as "write once, read never".
>>
>