Hacker News new | ask | show | jobs
by shellac 2771 days ago
You might be interested in the Fortress language (RIP), whose input allowed, and was canonical rendered using, mathematical notation.

So, for example, xˆy could be written as x superscript y. SUM[i<-1:n, j<-1:p, prime j] a[i] xˆj was more elegant as a big sigma with the ranges at the bottom, etc.

http://www.ccs.neu.edu/home/samth/fortress-spec.pdf

1 comments

One of the best (or worst, depending on your preference) aspect of Fortress syntax was that it allows juxtaposition as a multiplication operator. Therefore `(n+1)/(n+2)(n+3)` is, as expected, same as `(n+1)/((n+2)*(n+3))`. The exact "reassociation" procedure for juxtapositions is type-dependent, so that `sin(x)(x)` is `sin(x)` multiplied by `(x)` even though both `sin` and the first `(x)` is followed by other expressions.