The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Inactive » comp.soft-sys.math.mathematica

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Mathematica and Lisp
Replies: 16   Last Post: Mar 7, 2013 3:58 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Richard Fateman

Posts: 1,539
Registered: 12/7/04
Re: Mathematica and Lisp
Posted: Mar 5, 2013 10:13 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On 3/5/2013 1:15 AM, Bill Rowe wrote:

> Clearly, the current design isn't compatible with your desired
> workflow. But that doesn't necessarily equate to "bad design".
> It is less effort to look up the meaning of @@@ as described in
> Mathematica than for someone unfamiliar with C to determine what
> t=log(++u)+b will do.

To say that something else is even more inconvenient does not equate
with good design.

I think that using C documentation for looking up "++" is a lot
easier than say, noodling. (see the
article on noodling in wikipedia). That doesn't make the C
documentation "user friendly" or whatever descriptive term
you might prefer.

> If you don't care to remember the meaning of @@@ you are
> certainly under no obligation to do so or even use this
> notation. If it makes more sense to you, simply do
> Apply[f, expr, {1}]
> rather than
> f@@@expr

Frankly I've never found an opportunity to use Apply with a 3rd
argument (restricting its "level"). Perhaps I'm blinded by my
experience with Lisp, in which apply also exists but does not
have a level argument. It is just (apply function args)
> The only advantage of @@@ is the saving of a few keystrokes and
> perhaps improved readability for someone familiar with the
> meaning of @@@.

And decreased readability for someone unfamiliar with it and who
tries ? @@@ to get documentation.

>> I've mentioned it previously. But that's really a different point.
>> There are many 3-character non-alphabet sequences. How many of them
>> "mean" anything to you?

> Several. But then I use Mathematica extensively. Short cuts like
> @@@ are convenient for me. Consequently, I use them rather
> frequently and don't have any problem recalling their meaning.

You use @@@ frequently? Or other shortcuts? I use many, such
as +, :=, ->, /., //, @ , ;. which are verbose otherwise, and
at least for the first few, are already familiar. That is, x+y+z
seems to be handy rather than Plus[x,y,z]. This compares to Lisp,
slightly longer at (+ x y z)

>> As for @@@ being explained multiple times in this newsgroup, maybe
>> you should wonder why

>> (a) it should have to be explained even once
> Since it is not universal, it follows there needs to be at least
> one explanation somewhere. And since quite a few posters here
> haven't read much of the documentation, it follows strings of
> characters such as @@@ won't be familiar to them prompting a
> request for an explanation.

Maybe if ?@@@ worked, they won't have to ask.
>> (b) why it should have to be explained multiple times.
> No matter how many times it is explained, there will always be
> another new user encountering @@@ or some other short cut for
> the first time prompting a new request for explanation.

The proper response might be, type ?@@@

> The existence of multiple explanations in this forum for @@@
> isn't an indication of "bad design".

Actually, I disagree. I think that is supportive evidence
of bad design that repeated explanations are needed.

It is simply due to the
> fact Mathematica uses certain strings as short cuts that don't
> have meaning outside of Mathematica. The same situation exists
> for virtually any programming language.

Sure. are they documented? do they make sense after being explained
once? (I think that u++ and ++u make sense after one explanation.)

That is for most if not
> all programming languages you can find some sequence of
> characters that have specific meaning in that language but not elsewhere.

Yes, but not so many, nor do they step on each others' feet quite
so much. e.g. .3/.3->4
> Your comments here and elsewhere in this thread seem to amount
> to Mathematica is not easy for a new or casual user to use
> proficiently. If so, I agree.

I think you read me correctly.
Though I would go further and say it is not easy for a person
attempting to make serious use, who attempts to use his/her
mathematical background and general knowledge of other
programming languages and (say) computer arithmetic to
make generalizations of how Mathematica should behave.
(simple example: why does Mathematica reverse the order
of arguments to arctan of 2 args?)

But I believe the same is true of
> many other if not most other programming languages.

But not all?

I try to make comparisons only with languages I am
familiar with.



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.