MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Short-cut for reiteration. Concise, readable symbols and

  • To: mathgroup at smc.vnet.net
  • Subject: [mg118409] Re: Short-cut for reiteration. Concise, readable symbols and
  • From: "Christopher O. Young" <cy56 at comcast.net>
  • Date: Wed, 27 Apr 2011 05:38:13 -0400 (EDT)
  • References: <iorih5$o6t$1@smc.vnet.net> <ip14qm$ged$1@smc.vnet.net> <ip3lrr$r76$1@smc.vnet.net> <ip682f$bmc$1@smc.vnet.net>

On 4/26/11 6:50 AM, in article ip682f$bmc$1 at smc.vnet.net, "Peter Pein"
<petsie at dordos.net> wrote:

> I do not want to offend you.
>
> Is this a contest laziness vs. readability?
>
> There are options for some functions as strings like "AlternatingSigns",
> "ExtrapolatingOscillatory" and others where Ctrl-K does not help and
> "Table" is too complicated????
>
> shaking the head,
> Peter

I can't dig up the books right now, but isn't it long-standing usage in math
texts to be able to append a parameter list? E.g.,

(1-t)[0  k] + t[10-k   0],  k in {0, =8A, 10}

At any rate, that certainly seems like intuitive and concise notation to me.
I'm just trying to come close to that in Mathematica. It does seem "verbose"
if I have to use "Table" every time I do something as routine as the above.
There should be a syntax as short as the above example.

But I'll settle for

Graphics[Line[{{0, k}, {10 - k, 0}}~Table~{k, 0, 10}]]


Or
Line[{{0, k}, {10 - k, 0}}~Table~{k, 0, 10}] // Graphics

This comes closer to how I think about drawing a line.


I appreciate the shortcuts Mathematica provides, more because I find the
code cleaner and easier to follow if there are concise syntactical forms for
everyday, simple, routine situations such as the above notation for
parameter lists.

Having to use "Table" makes the code look unnecessarily cluttered, it seems
to me. There should be an ellipsis and a convention like the above in these
cases.

How can Mathematica become a popular tool for high school students, and most
college students, if they have to use cluttered, verbose code for everyday
routine expressions?

Another example: Mathematica should accept vectors in column format, not
just in list format or in row format. This would make linear algebra coding
about 100 times more readable.


I admire Michael Trott's abilities, but wading through the unformatted,
uncommented, tightly packed code of his introductory chapter just about
prevented me from picking up his Guide Books for months. It turns out that
it's mostly very concise string processing, but it took hours of formatting
and trying things out to see what he was doing.

Later on, he has in-depth discussions of Mathematica's structure that are a
big help for practical purposes, but you wouldn't guess it from the start of
his "Programming" Guide Book.

I suppose to experienced Mathematica programmers this sort of thing becomes
more natural. But it shouldn't take years to transfer from other forms of
programming to Mathematica programming. And it shouldn't take years of
training to grasp the mathematical meaning behind a page of Mathematica
code.`





  • Prev by Date: Re: Short-cut for reiteration, via postfix usage of Table as pure
  • Next by Date: Re: need your help
  • Previous by thread: Re: Output Precision Exploration
  • Next by thread: Learning Mathematica with neat projects