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

Quasi-Void Rendering Ambiguity in Paths #1157

Open
hostilefork opened this issue Jan 25, 2024 · 1 comment
Open

Quasi-Void Rendering Ambiguity in Paths #1157

hostilefork opened this issue Jan 25, 2024 · 1 comment
Labels
low priority pretty unimportant in the scheme of things

Comments

@hostilefork
Copy link
Member

hostilefork commented Jan 25, 2024

Quasi-Voids were made legal in PATH! and TUPLE!, specifically to facilitate things like:

dir: first [~/projects/stuff]

But this creates an ambiguity with things like:

~/foo/~

... which could be a regular path with quasi-voids in the first and last positions... or a quasi-path with blanks in the first and last positions. 😦

I guess that quasi-paths which start or end with slashes need vertical bars around them.

~|/foo/|~  vs.   ~/foo/~
~|/foo|~   vs.   ~/foo
~|foo/|~   vs.   foo/~

~foo~ and ~foo/bar~ is unambiguous

Annoying, but, I think it's worth it. ~/projects/stuff is legal in Redbol and I'd rather not lose the ability to do that.

@hostilefork hostilefork added the low priority pretty unimportant in the scheme of things label Jan 25, 2024
@hostilefork
Copy link
Member Author

I guess that quasi-paths which start or end with slashes need vertical bars around them.

Vertical bars are now eliminated as an escaping mechanism, so this would not be an option.

But current thinking is that PATH! and TUPLE! do not come in quasiforms or antiforms. That simplifies this, so if you see:

~/foo/~

You know that's not a QUASI-PATH! because there are no QUASI-PATH!s.

A remaining problem is the special case of / being a WORD! (to make it assignable and customizable as a division operator). Then ~/~ would be an quasi-word. That may just be a consequence of the design, in which case we'd just have to disallow the creation of paths with ~ in the first and second slots.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
low priority pretty unimportant in the scheme of things
Projects
None yet
Development

No branches or pull requests

1 participant