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.
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.
But I'm not a fan of the %w syntax.
I'm not wedded to it :-)