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

treat newline as space in argument lists #191

Closed
StefanKarpinski opened this issue Sep 3, 2011 · 4 comments
Closed

treat newline as space in argument lists #191

StefanKarpinski opened this issue Sep 3, 2011 · 4 comments
Assignees
Labels
bug Indicates an unexpected problem or unintended behavior

Comments

@StefanKarpinski
Copy link
Member

This version doesn't parse:

run(`perl -le '$|=1; for(0..9){ print; sleep 1 }'`
    | prefixer("X",3) & prefixer("Y",3) & prefixer("Z",3)
    | prefixer("A",2) & prefixer("B",2))

even though this one does:

run(`perl -le '$|=1; for(0..9){ print; sleep 1 }'` |
    prefixer("X",3) & prefixer("Y",3) & prefixer("Z",3) |
    prefixer("A",2) & prefixer("B",2))
@ghost ghost assigned JeffBezanson Sep 3, 2011
@JeffBezanson
Copy link
Member

I can fix it, but we might want to think about it. Some contexts (statement blocks and matrices) are newline-sensitive, for example:

begin
  2
  +3
end

does not parse as "2+3". We have to decide if it's ok for argument lists to be different.

@StefanKarpinski
Copy link
Member Author

The current behavior seems unexpected. What are the downsides of making newlines inside of parens "just whitespace"?

@JeffBezanson
Copy link
Member

The only downside, which is pretty minor, is that the same syntax won't work in all cases. For example

f(1
  |
  2)

applies f to 1|2, but

{1
 |
 2}

makes a 3-element cell array.

@StefanKarpinski
Copy link
Member Author

In that case I'd say go for it.

StefanKarpinski pushed a commit that referenced this issue Feb 8, 2018
cmcaine pushed a commit to cmcaine/julia that referenced this issue Sep 24, 2020
Keno pushed a commit that referenced this issue Oct 9, 2023
* allow 0.4 semver for CodeTracking
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

2 participants