FAQ

On Thu, Jan 29, 2015 at 3:26 PM, Ed Avis wrote:

Normally I would agree that adding new keywords is not a great idea when
they
can be provided by a library instead, and imported into the global
namespace
only for those who request them. But as far as I know there isn't a way
for
a library to provide infix operators such as 'eq'?

If there were, then of course

infix sub eqi { fc($_[0]) eq fc($_[1]) }

would do the trick, and any cleverness about not copying the strings could
be handled by the optimizer.
I suspect you missed my point. Why do we need new syntax for this? Why
can't we just optimize the implementation of the existent syntax? We
already do such things for sort for example.

Leon

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 4 of 17 | next ›
Discussion Overview
groupperl5-porters @
categoriesperl
postedJan 29, '15 at 12:57p
activeFeb 5, '15 at 3:51p
posts17
users11
websiteperl.org

People

Translate

site design / logo © 2021 Grokbase