On Wed, Oct 23, 2019 at 9:23 PM Steven D'Aprano email@example.com wrote:
On Wed, Oct 23, 2019 at 08:50:06PM +1100, Chris Angelico wrote:
On Wed, Oct 23, 2019 at 8:33 PM Steven D'Aprano firstname.lastname@example.org wrote:
The most complicated feature I can think of is whether we should allow escaping spaces or not:
names = %w[Aaron Susan Helen Fred Mary\ Beth] names = %w[Aaron Susan Helen Fred Mary%x20Beth]
The second one? No. If you want that, use a post-processor or something.
Ouch! Sorry, that was a brain-fart, I meant \x20 like in a string.
Oh! Then I withdraw the objection, heh.
We surely will want to support the standard range of string escapes, not just ASCII identifiers, so once you support string escapes, you get \x20 for free. The words should be arbitrary sequences of Unicode characters, not just limited to identifiers.
If you have string escapes, is "]" a literal close bracket? It isn't in a string literal, and yet people will expect to be able to escape the delimiter. I think the proposal would work fine with a restricted alphabet for the tokens, with room to potentially expand it in the future.