Group Abstract Group Abstract

Message Boards Message Boards

0
|
1.8K Views
|
1 Reply
|
1 Total Like
View groups...
Share
Share this post:

If you type out the fullform of an expression are parentheses unnecessary?

If you always type out the FullForm of the expression, do you never have to worry about parentheses? That is, does the canonical form have no ambiguity if you had to type parentheses, that would mean there would be two possible interpretations of how to process the FullForm input, but that's not a problem when you use the FullForm expression, except maybe if one of the variables has been defined outside the scope. Parentheses seem necessary when using shortened forms like /@, @@, @@@,? for things like IntegerQ, #, /.,//, etc.

POSTED BY: Peter Burbery
Posted 3 years ago

I believe that you would never need parentheses if you always use the full form. In fact, I think if you used the full form, you couldn't use parentheses in any meaningful way (i.e. there is no syntactically correct way to use parenthesis in non-trivial ways in the full form). I say "believe" and "think" to hedge my bets here, because I haven't done an absolutely exhaustive study, and maybe there is some arcane example that I'm not aware of. But I think that for all practical purposes at least, the answer to your question is "yes".

POSTED BY: Eric Rimbey
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard