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

A *(foo, bar) B was deprecated #41588

Closed
rayegun opened this issue Jul 14, 2021 · 8 comments
Closed

A *(foo, bar) B was deprecated #41588

rayegun opened this issue Jul 14, 2021 · 8 comments

Comments

@rayegun
Copy link
Member

rayegun commented Jul 14, 2021

The paper Novel Algebras for Advanced Analytics in Julia makes use of the syntax A *(foo, bar) B. It looks like this was deprecated at some point.

Is it possible for this syntax to make a return?

@mbauman
Copy link
Member

mbauman commented Jul 14, 2021

I don't believe this ever worked; the Julia syntax in that paper is *(foo, bar)(A, B) (nb distinct from LaTeX math). General infix syntax for A f B is #16985; supporting A f() B is a further case of that issue.

@mbauman mbauman closed this as completed Jul 14, 2021
@rayegun
Copy link
Member Author

rayegun commented Jul 15, 2021

@mbauman @ViralBShah disagrees, that the capability existed at some point. The paper http://math.mit.edu/~edelman/publications/novel_algebras.pdf explicitly references the capability. I am aware of the previous issue, but I have my doubts about any of the proposals there being implemented in the near future given the lack of discussion since 2016. I'll look further into that issue. Hopefully there's a workable proposal there.

@ViralBShah
Copy link
Member

There was a funny infix version that did work back then, but this was all pre 1.0.

@ViralBShah
Copy link
Member

You had to do A *(max,+)B IIRC, and looking at the paper. The missing space was the key back then.

@rayegun
Copy link
Member Author

rayegun commented Jul 15, 2021

Ah the space. It parses to multiplication by juxtaposition now or something to that effect if you don't have the second space.

@mbauman
Copy link
Member

mbauman commented Jul 15, 2021

Even in Julia 0.1.2 (Mar 7, 2013) this parsed the way it does today:

julia> VERSION
v"0.1.2+113667293.r7252"

julia> :(A *(max,+)B)
:(*(A,*((max,+),B)))

julia> :(A *(max,+) B)
ERROR: syntax: missing separator in tuple

This predates me, and yes, I now see it in that figure caption, but I'd still be surprised if this ever worked (without some hacky *(::Tuple{Function, Function}, ::Matrix) lazy thing).

@ViralBShah
Copy link
Member

ViralBShah commented Jul 15, 2021

I distinctly remember Alan showing that it worked. There were no other hacks. I am now curious and will try to dig this up.

@ViralBShah
Copy link
Member

In any case, just to be clear, this is only of historical interest. I am not proposing reopening the issue.

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

3 participants