|
|
| Keep It Simple, Stupid | |
| PerlMonks |
Re^3: Is there a module for object-oriented substring handling/substitution?by smls (Beadle) |
| on Jan 26, 2013 at 15:43 UTC ( #1015503=note: print w/ replies, xml ) | Need Help?? |
|
I don't care much for speed, I care about convenience and elegance. Regarding the use-case of creating editors, they might prefer to use their own special-purpose class for performance reasons, with integrated support for efficient feedback on state changes of tracked ranges.
For example, the Kate editor (coded in C++ with Qt and KDE libs) uses a light-weight class called MovingRange for keeping track of persistent ranges withing an opened document. They created this solution from scratch in 2010, dropping their previously used, more generic framework called "SmartRanges", in part due to performance reasons (see blog post). For my purposes, notification about state changes is not needed, nor is performance a critical consideration so having a full substring class that stores a copy of its text (rather than just a thin "range" class pointing to a location withing the parent string) should not be a problem.
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||