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

Commas to separate multi-statements on single line #2

Closed
d4tocchini opened this issue Aug 7, 2013 · 2 comments
Closed

Commas to separate multi-statements on single line #2

d4tocchini opened this issue Aug 7, 2013 · 2 comments

Comments

@d4tocchini
Copy link
Contributor

As suggested by @jpaulm

c:\threadn\pompiers.fil' -> OPT Lire() OUT -> IN Select() OUT -> IN Ecrire() Select() REJECT -> IN Ecrire2() ... and so on is tough to scan! Should become:

c:\threadn\pompiers.fil' -> OPT Lire OUT -> IN Select OUT -> IN Ecrire, Select REJECT -> IN Ecrire2 ... and so on

@DjebbZ
Copy link
Contributor

DjebbZ commented Aug 12, 2013

It would be nice too if an example of multi-statements like this one could appear in the README (and also in the noflo.js website !).

@jpaulm
Copy link

jpaulm commented Aug 12, 2013

Dan has suggested we could make commas optional at the end of a line - I till feel this could cause problems, as that means our scanners have to be line-sensitive. I tend to dislike line-sensitive syntax, as I have found that you often have to some kind of escape convention meaning "this end of line is not really an end of line". And you can't divide up lines arbitrarily to make them look pretty!

For instance, let's take the line I showed in my previous note and carve it up arbitrarily as follows:

'c:\threadn\pompiers.fil' -> OPT Lire
OUT -> IN Select OUT -> IN Ecrire, Select
REJECT -> IN Ecrire2 ... and so on

IMO you have a similar problem to what I was trying to avoid - Lire is not the end of a branch because the next line starts with one token followed by an arrow, which is impossible at the beginning of a branch. I would really prefer to require commas at the end of every branch, even if it's end of line (except of course at the end of a network definition).

@bergie bergie closed this as completed in 3c03b2b Sep 17, 2013
jonnor pushed a commit that referenced this issue May 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants