All Questions
Tagged with language-design syntax
12 questions
19
votes
1
answer
247
views
Why does OperatorApplied by default reverse the arguments?
Perhaps this is just one of those Mathematica curiosities, but I'd like to know why by default
OperatorApplied[f][x][y] === f[y,x]
versus the more usual way one ...
6
votes
3
answers
531
views
Is $2x$ documented?
According to the official documentation of Times[], multiplication of $x$ and $y$ is represented as one of
x*y
x×y
...
6
votes
2
answers
323
views
Separation of statements vs "space mul", formal definition of Mathematica syntax?
In Mathematica, space can often be used to indicate multiply. For example "a b" = "a * b". On the other hand, in a *.m file, we also have multiple statements separated by newlines. How does the ...
8
votes
0
answers
106
views
What is the philosophy behind \[Rule] (a.k.a. `->`) for assigning options?
Today I was banging my head against my desk when I realized that the problem I was experiencing was due to having typed
ImageSize[Large]
instead of
...
3
votes
1
answer
195
views
Single argument operator form?
I've heard the explanation that functions like StringDrop[] are varargs and so that is why they do not have an operator form.
But when you are only using the ...
4
votes
1
answer
61
views
A natural syntax for a Query that holds
Often I have an unevaluated expression in a RuleDelayed Key-Value pair and subsequently want ...
5
votes
0
answers
212
views
Is there an internal logic behind short form symbols, such as @ (Prefix), @@ (Apply), /@ (Map), /. (ReplaceAll) [closed]
To me, function names (such as Apply and Map) seem more intuitive than their symbols (e.g. @@...
9
votes
1
answer
510
views
Why is Reap result nested? [closed]
A minimal (toy) example for my question:
i= 1;
Reap[Do[Sow[i = (i + 1)^2], {4}]]
(* {Null, {{4, 25, 676, 458329}}} *)
I presume the entire result is a ...
13
votes
2
answers
902
views
Why aren't parentheses ( ) an expression in Mathematica?
Why aren't parentheses ( ) an expression in Mathematica?
Can I get an expression in a form where parentheses are represented by an expression?
45
votes
5
answers
2k
views
Why is there no PositionFunction in Mathematica?
Too often I have seen the programs of inexperienced users greatly slowed by using Position in an iterative fashion, when far faster would have been to compute a ...
3
votes
1
answer
2k
views
Why is Euler's number an uppercase "E" and not a lowercase "e"?
Why is Euler's number an uppercase "E" and not a lowercase "e"?
Isn't Euler's Number normally expressed with a lowercase "e"?
22
votes
3
answers
5k
views
Why does Mathematica use [[ ]] notation for array indexing?
I am confused by why Mathematica uses [[3]] to get the 3rd element, or [[i,j] to get the i,j-th element of a 2D array.
This ...