P is for Practical | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Perl already enforces bits of the language. E.g., with C++ I can pick to use a regexp library that comes on a UN*X platform, or a C++ regexp library, or (f)lex (for some things), or Henry Spencer's regexp library, or the Perl5 compatible regexp library, or any number of other libraries. What regexp libraries has Perl got? ONE. Can you write another library that will have the same syntax? (Probably) NO. Is the syntax consistent with the rest of the language? NOt really. Is this a good thing? Probably yes. Perl is still very much a data munging language; it's an important part of being glue. And regular expressions are exceedingly important there, both in terms of expressibility and in terms of efficient manipulation. More of the sameWhat containers has Perl got? TWO: arrays and hashes. Want something else? It's not going to be as convenient: no special syntax (stealing syntax from something else is "using other syntax", not having "special syntax"), either less portable (if you use a C or C++ extension) or less efficient (if you extend in Perl), and less familiar to "A Perl Programmer". Is this a bad thing? Probably not. Perl culture emphasises other things (although Perl6 might improve some things). But sticking to the standards of a language is important: a Perl program, written in the Perl culture (regexps, CGI.pm, Tk, closures, blessed objects, etc.) is understandable to any good "Perl Programmer". Another Perl program, using less standard features, would be harder to understand. E.g. functional Perl is possible, but none too popular, for this reason. In reply to Re: Re: We have no SPL.
by ariels
|
|