Smylers wrote:

I take "valid identifier" to mean something which is syntactically valid
as an identifier, rather than something that is in the finite set of
identifiers which C<form> actually uses.

Correct.


Although, as Larry pointed out, given the compile-time nature of option keys, there's no reason subroutine arguments labelled using the option syntax couldn't be checked for validity against the subroutine's named parameters as compile-time too.


Using the C<< => >> it's possible to construct pairs in which the key is
not a valid identifier:

  'Hello there' => 'contains a space',
  '2b'          => 'starts with a digit',
  '%^&@";'      => 'only punctuation characters',

None of those keys could result from using the C<:> option constructor.

Exactly.


Damian

Reply via email to