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

Add back --readable-names flag #514

Open
disnet opened this issue Mar 28, 2016 · 6 comments
Open

Add back --readable-names flag #514

disnet opened this issue Mar 28, 2016 · 6 comments

Comments

@disnet
Copy link
Member

disnet commented Mar 28, 2016

By default hygiene gives all bindings a new name with _<number> appended to it. In most cases you can just drop the unique suffix; it is only needed in cases where multiple bindings with the same name mix. In pre 1.0 the --readable-names flag did this.

Adding it back now is probably much easier with the Shift scope analyser.

@jayphelps
Copy link
Contributor

This discussion has probably happened elsewhere but any reason not to make the --readable-names behavior the default instead and provide a flag to uniquify everything if they want that?

@disnet
Copy link
Member Author

disnet commented Apr 12, 2016

Ah good call. That's probably a better default.

@bearnshaw
Copy link

+1

@gkovacs
Copy link

gkovacs commented Feb 17, 2017

Doesn't seem to have been addressed. A "fix" which probably breaks things but works for me is in my branch https://github.com/gkovacs/sweet.js at gkovacs@94f6374

@disnet
Copy link
Member Author

disnet commented Feb 19, 2017

@gkovacs indeed that will avoid the renaming but hygiene is obviously broken now.

@gkovacs
Copy link

gkovacs commented Feb 19, 2017

yes I mean obviously the system should optimally check to see if a rename is required and only rename if necessary. none of my macros declare new variables so it seems to work for my purposes.

@disnet disnet added this to Eventually in Worklist Apr 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Worklist
Eventually
Development

No branches or pull requests

4 participants