[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: another take on hackers and painters
At 11:40 AM -0400 5/23/03, Anton van Straaten wrote:
>Dan Sugalski wrote:
>> The big reason for this is the origins of perl--it started as a
>> language for quick-n-dirty sysadmin and text processing tasks and
>> grew out from there. Many of the programs lived only on the command
>> line, and many more were thrown together in a dozen or two lines of
>> code. The data they dealt with was dirty, but dirty in predictable
>> ways, and perl's defaults are shaped to deal with that.
>Right - but the problem, and the only reason anyone outside the Perl
>community needs to care about it, is that these behaviors are now being
>spread and even promoted as a proper way to do things in other contexts.
>Perl is teaching people bad habits, and missing an opportunity to teach
You forgot the fact that we're responsible for global warming,
imperialism, the decline in the moral fibre of today's youth, and
dadaism. Oh, and pop art is our fault too. Sorry about that one. (We
are *not*, however, responsible for neo-victorian architecture,
attractive though a skulls and vulture motif may be)
Seriously, this isn't our (or, rather, perl's) concern. Perl isn't a
teaching language, it doesn't much care what anyone's pet theories
are, and we're a cranky lot anyway. We do what we do because it suits
our needs and gets our job done. The P in perl stands for "Practical"
(well, after the fact) for a reason.
If you don't like what we're doing or how we're doing it, that's
fine. Do it better so people do it your way instead. Heck, if you do
it better then *we'll* do it your way too. (That whole 'practical'
> > >Perl will only ever try to interpret
>> >a string as a number if it is provided with a string where it expects
>> >a number. Further if you're running with "use warnings" (which is the
>> >recommended option with which to run perl programs) then perl *will*
>> >complain if it tries to autoconvert not-a-number into a number.
>> Right, and those warnings can be set to be errors as well if you want.
>If autoconversion is desirable in some contexts, then surely what you want
>is the ability to mix autoconversion and strictness in the same program?
>Which probably means that different operators (or functions) are needed for
>the different purposes. Proposal: add an operator ~+~, pronounced
Perl lexically scopes the warnings and/or errors for conversion error
checking, which works nicely for us.
--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
firstname.lastname@example.org have teddy bears and even
teddy bears get drunk