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

Bye Bye --- hello ; #16

Open
machaval opened this issue Jun 12, 2020 · 3 comments
Open

Bye Bye --- hello ; #16

machaval opened this issue Jun 12, 2020 · 3 comments
Labels
proposal For new language proposals

Comments

@machaval
Copy link
Contributor

One thing that has been going over my mind is to remove --- or at least make it optional. Every time I have try it I was not able to do it because of grammar ambiguity. But one option that we never explore is to add ; at the end of the sentences. Then --- can be omitted.

To be honest I don't have any problem with --- but new people find this quite weird. What do we think?

@machaval machaval added the proposal For new language proposals label Jun 12, 2020
@mikeacjones
Copy link

@machaval I agree - the --- isn't an issue. It is a bit weird at first glance because I don't know any other language with something like it, but it isn't a difficult concept to grasp. I don't see it as a problem, personally.

@jerneyio
Copy link
Contributor

I didn't like it at first, but it's grown on me. I currently like that it makes it more obvious whether the file I'm dealing with is a module or an executable script

@menduz
Copy link
Contributor

menduz commented Jun 12, 2020

what if you replace it with a top level return instead?

%dw 2.0

fun myThing() = 1

return {a: myThing()}

How would the ; look like in an example?

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

No branches or pull requests

4 participants