3
$\begingroup$

I'll probably get ripped apart over this, but: Is there an option to make Mathematica use more common formatting conventions when dealing with commands? For example, most programming languages use function() for functions and [Array] for arrays, while Wolfram does this backwards.

On top of that, I mainly use a laptop with a small keyboard so I prefer using "()" when possible. I don't suppose there's a way to change this, and other similar behaviors, for Mathematica, is there?

Sadly Maple isn't available to me. Thanks for answering!

$\endgroup$
3
  • $\begingroup$ Have you had a look at Maple? $\endgroup$
    – Sascha
    Commented Jan 1, 2016 at 12:04
  • $\begingroup$ Do a docs search on TraditionalForm -- it should meet your needs $\endgroup$ Commented Jan 1, 2016 at 12:25
  • $\begingroup$ Custom keyboard shortcuts can enhance the typing experience. $\endgroup$
    – Karsten7
    Commented Jan 1, 2016 at 12:48

1 Answer 1

8
$\begingroup$

tl;dr In principle, yes. In practice, it's not worth the (considerable) trouble.


In Mathematica, everything is an expression. That applies to both code and data. The standard textual representation of expressions is what InputForm returns and what we normally think of as the Wolfram language (Mathematica's programming language). But in principle you can come up with alternative representations. In fact you'll be able to find a few examples of this:

  • ExpressionML is an XML representation of Mathematica expressions
  • TraditionalForm uses f(x) instead of f[x] and is meant to look like traditional mathematical notation (but it is ambiguous and thus not suitable for programming)

You can come up with your own representation and write a parser that converts it to input form. Then use $PreRead to process everything through that custom parser.

This should be a considerably easier task than coming up with alternative syntaxes for other programming languages due to to uniformity, simplicity and transparency of Mathematica's expression structure. You can start with a minimalistic notation (something akin to FullForm) and already have a language which is usable at least in principle. Then add various operators and shorthands (such as a+b for Plus[a,b]) gradually, according to your needs. But by no means will it be a simple or small project. Nor can I see how you or anyone else would realistically benefit from it. No one except you will be able to read this sort of code, and it would be much easier for you to just get used to the standard Mathematica notation. But making an alternative notation might be a good learning project anyway, e.g. if you would like to learn more about parsers or would like to get experience with designing a new language syntax.

$\endgroup$
1
  • $\begingroup$ while a warning message appears when you use TraditionalForm I don't think the problems are as significant as many think. I note that a lot of stuff in The Mathematica Journal used to be in TraditionalForm and as a trial I just ran this: community.wolfram.com/groups/-/m/t/759091?p_p_auth=zzChlh7n in TraditionalForm without any problems. Certainly for this user it could be a worthwhile starting point. $\endgroup$ Commented Jan 2, 2016 at 2:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.