OpenBSD 4.1: Puffy Strikes Again (O'ReillyNet)
Posted May 5, 2007 10:04 UTC (Sat) by
khim (subscriber, #9252)
In reply to:
OpenBSD 4.1: Puffy Strikes Again (O'ReillyNet) by tetromino
Parent article:
OpenBSD 4.1: Puffy Strikes Again (O'ReillyNet)
> It's not safe
$ perldoc Safe
Kind of ironic that two most dangerous languages in wide use (PHP and Perl) have "safe mode" - and in both cases it just makes life difficult for programmer but does not actually make the result safer ? In both cases "safe mode" only adds few checks and does not make the result of program more preductable.
> it's not readable
a matter of taste; I find it more as readable as C and Python, and vastly more readable than Javascript.
Not really. If you don't really know what the language construct actually does - it does not matter if there are good or bad things in language syntax: to really understand the program you need to dig deep in source of interpreter and/or scan test suite for sutable test. And even then it's usually just a guess. Sometimes you can correctly guess what the program does without doing it - but usually only for small scripts. Javascript has similar problem but it's not really the same: Javascript has well-defined syntax and semantic (unlike Perl), but when it finds something "bad" it tries to "fix it" and execute anyway (instead of signalling error) and yes, it's very annoying.
> a lot of operations in Perl don't have well-defined semantics.
No, you just haven't read the documentation or the Camel Book.
Me ? I've just scanned it few times. But actually I was not the guy who said that Perl is hopeless. There are other guy who did. His name is Larry Wall. Have you heard about him ? It was he who first said that Perl syntax is unmaintable and unfixable mess - it just coincided with my own observations (I was Perl maintainer for local Linux distribution at the time). BTW he quite literally said this - aloud, on conference, so I'm not sure it's easy to find records. But you can easily read narration here (scroll to "What's Wrong with Perl 5").
> That's why threaded Perl is not default even today
Threaded perl not default because of *thread-unsafe external C libraries* many old Perl modules link to.
Wrong. You can easily compile all C libraries with pthreads support and as long as you are not actually using threads - you will be Ok. But if you enable threads support in Perl - everything goes to hell. Threaded Perl breaks things even if you are not using threads and/or C extensions. The mere activation of threads support in Perl broke LaTeX2HTML last time I've checked - and that's pure Perl script, no external C extensions in sight. Today they "fixed" it by bolting on pseudothreads, but it's band-aid at best. Ithreads have separate interpreters for different threads - how it's different from fork+shared memory? It's not threads - it's travesty, C library was fixed by replacing one global variable (errno) with function, Perl apparently can not be fixed at all.
> there are no easy way to fix semantic because it's a mess
It's not perl's fault that C programmers don't know how to use pthreads properly.
What this has to do with anything ?
> why hopeless Perl6 project exists
The perl6 project exists because perl5 is over 10 years old, and has some obvious deficiencies.
Have you ever took an interest in the list of these deficiencies ? Number one is lack of well-defined semantics. And lack of well-defined semantics is definition of unsafe language! And no extensive test suite is not panacea: LaTeX2HTML was broken anyway even if all perl regression tests said everything should be Ok.
(
Log in to post comments)