Opened 5 years ago

Closed 4 years ago

#312 closed defect (fixed)

unquoting and identifiers beginning with @

Reported by: alexshinn Owned by: cowan
Priority: major Milestone:
Component: WG1 - Core Keywords:
Cc:

Description

Now that @ may begin an identifier, we should probably make
some comment about unquoting, i.e. to distinguish whether
,@foo is (unquote @foo) or (unquote-splicing foo).

Since these identifiers did not exist before, I recommend the
latter (that is, use unquote-splicing if ,@ is seen), and we
should add a note that if you want to unquote an identifier
beginning with add you need to either insert whitespace or
escape the identifier, e.g. , @foo or ,|@foo|.

The good news now is that SXML is no longer invalid syntax.

Change History (6)

comment:1 Changed 5 years ago by cowan

None of my suite of Schemes supports , @foo as equivalent to ,@foo, so I think that option is out. Users will need to write ,|@foo|, which works on all Schemes that support pipes (some do not, some treat | as an ordinary identifier character).

comment:2 Changed 5 years ago by arcfide

The above states that maybe we treat ', @foo' as an unquoted identifier @foo, and Chez Scheme does this. Is Chez Scheme not in your test suite, or were you testing something else?

comment:3 Changed 5 years ago by cowan

No, my test case was incorrectly stated. I retract my comment: , @foo works fine to unquote the variable @foo.

comment:4 Changed 5 years ago by cowan

  • Status changed from new to decided

The WG voted to treat ,@foo as (unquote-splicing foo), requiring , @foo for (unquote @foo).

comment:5 Changed 5 years ago by cowan

  • Owner changed from alexshinn to cowan
  • Status changed from decided to writing

comment:6 Changed 4 years ago by cowan

  • Resolution set to fixed
  • Status changed from writing to closed
Note: See TracTickets for help on using tickets.