perl 5.14 added the keyword hook, which lets XS modules implement new keywords. It's great. I use it lots. But it is limited to only prefix keywords - the word must appear first to introduce new syntax. While this is generally nice - for humans as well as perl - it does mean that XS modules can't provide even two of the most commonly-requested infix operators:
$obj isa ClassName # true if blessed($obj) and $obj->isa("ClassName")
$x in @y # true if any { $x eq $_ } @y
While it would be giving XS authors a lot of rope by which to hang themselves, a small extension to the keyword hook mechanism could allow such infix operators to be created.
perl 5.14 added the keyword hook, which lets XS modules implement new keywords. It's great. I use it lots. But it is limited to only prefix keywords - the word must appear first to introduce new syntax. While this is generally nice - for humans as well as perl - it does mean that XS modules can't provide even two of the most commonly-requested infix operators:
While it would be giving XS authors a lot of rope by which to hang themselves, a small extension to the keyword hook mechanism could allow such infix operators to be created.