Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compound expressions in certain function arguments, and elsewhere? #8

Open
davidfarmer opened this issue Apr 19, 2019 · 0 comments
Open

Comments

@davidfarmer
Copy link
Collaborator

davidfarmer commented Apr 19, 2019

Some functions are commonly written without parentheses around their
arguments in certain cases, such as

cos 2pi = 1

A convention which seems workable is to consider the argument to continue
until white space or the end of the expression.

The some convention would interpret
e^2x as exp(2x)

Another situation where a similar convention might be workable is in limits
of integrals as in

int_0^2pi cos x dx = 0 .

Except that it would be weird to allow that in the lower limit but not the upper
limit:

int_18pi^26pi sin x = 0

There it is the ^ and not a space that signals the end of the lower limit.

But if that works, then why not

sum_n=1^infty n^-2 = pi/6 ?

I am not advocating either way. I find
sum_n=1^infty harder to read than sum_(n=1)^infty
so maybe there is nothing to be gained by allowing that flexibility everywhere.

It would be nice to have a sharp line delimiting when such grouping has
parentheses optional. Maybe this will become clearer as we test more examples.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant