-
-
Notifications
You must be signed in to change notification settings - Fork 9
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
Parsing quirks #149
Comments
If we get rid of collection atoms, #130, that frees up the A comment string now turns out like this:
The single leading
But now Parinfer wouldn't like the brackets here and would have to indent them at least this much:
It wouldn't care about the comments' indentation, but if we want them aligned with the other elements, that's where they go. Parinfer also wouldn't allow a closing bracket to start a line like this, so it needs the final discarded item. Square brackets are maybe nice for inline extras, but this seems worse if they span multiple lines. |
|
|
|
|
|
The EDN Hissps have claimed The The dot is the natural choice here (though not the only one), but it would have to munge for the attr in macro to be a valid identifier. It can currently be defined using |
I'm noticing that the desired interpretation of Tags have no particular need for a leading dot either, so |
Looks like EDN tags can't start with a dot (must be alphabetic after the |
Found another one:
This happens to compile to a valid assignment, which is interesting. Only at the top level though. It's a little too situational to be very useful and it's nonsense when nested. Not worth keeping. But is it worth fixing? The fix would probably be to make it an error, but it's already that (except at the top level, where it's not, but not useful either). |
Actually, it does work nested. Sometimes.
Still seems too situational to be useful. I still kind of think this should be an error, and seeing how it's not just a top-level problem makes me more inclined to fix it. |
\\.
should be an alias ofQzBSOL_.
, i.e. a module literal. Instead it's read asQzFULLxSTOP_
. Not sure how that happened, but full stops are handled separately, and this seems wrong.It is currently possible for a reader macro to start with
:
e.g.(defmacro :QzHASH_ (...
, which doesn't seem like the ideal way to say it. This ends up adding a non-identifier string to the_macro_
namespace, which prevents attribute-access symbols like_macro_.:QzHASH_
from working. I'm not sure what\:\#
should be. Making it:QzHASH_
would work for the defmacro, but it doesn't make a lot of sense. Maybe the\:
should suppress the control word interpretation, making itQzCOLON_QzHASH_
? But then the reader macro usage would have to be spelled\:#foo
, which isn't as nice. Should control words be disallowed as reader macro names? Should they always be treated like the first character is escaped? Maybe just colons? I will have to think about this some more.Reader macros with extras could be more compact if symbols weren't allowed to contain
!
. Then you could sayfoo#!1!2!3 bar
instead offoo# !1 !2 !3 bar
orfoo#!!! 1 2 3 bar
. You could still escape them, like any other character. But there are conventions where mutating/dangerous functions end in a!
, and now they'd have to end in a\!
, which isn't as nice. Maybe there's some way to avoid that. Extra could maybe use some other character instead of!
. Lisp's symbols can contain more characters than Python, but that also means you need spaces to separate things in situations Python wouldn't. I'm not really satisfied with the whole Extra system, but I don't have a better idea yet.The text was updated successfully, but these errors were encountered: