-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 At some point hitherto, [EMAIL PROTECTED] hath spake thusly: > Hmmm, if you don't like $|, as Kevin already pointed out, you can: > > Use English; > > $OUTPUT_AUTOFLUSH = 1; > > which I actually find far more readable and understandable than even > your C example above.
Yes, you *CAN* do that. The problem is absolutely no one does. So it hardly matters that it's available. > Well, I think it's more that they're lazy. Why type $OUTPUT_AUTOFLUSH > when you can type $| instead? Precisely. > If someone who doesn't know the language needs to know what $| does, > it's well documented. Of course it is. But the documentation does nothing to make the *program* more readable. > >Again, it's not about documentation. It's about design. > > Right, and perl was designed to be as flexible or as rigid as you'd > like it to be. I think it's more about learning the language. Which is a task that many (like me, and apparently mod, given he started this thread) find more difficult to do than with many other languages, due to it having a lot of these kinds of things. I've learned quite a few languages: Basic: easy Logo: easy Pascal: easy Fortran: easy C: slightly harder than above, but still pretty easy Bourne shell: easy (though getting a grip on regex is a challenge) scheme: moderate (strange syntax, no looping, everything is recursive[1]. Oh yeah, and all the damned parentheses!) Perl: difficult, largely due to obscure syntax and unreadable example code, IMO Obviously, YMMV. Pointers (and pointers to pointers!) were probably the most difficult part of most of those (that had them). But once you get them down in one language... [1] strictly speaking, this isn't true. But this was the way we were made to learn it, and use it > I would say that you're quite a bit more proficient at C than I am, > but less so at Perl. Things like $_, $!, $|, etc. are second nature > to me, where as things like setlinebuf are second nature to you. You still seem to be missing the point. Certainly, proficiency plays a role. But the point is that there is no meaning inherent in $! (the use of which BTW, I have no idea, despite having seen and I'm pretty sure even used)... This, in combination with the fact that there are dozens of these variables, in combination with the fact that most Perl programmers seem to be delighted to use $a and $b, makes it very difficult to remember what they all do, and read code that uses them. Even were I to use Perl regularly, I would have a hard time remembering which was which, and hence avoid them whenever possible. They do not lend themselves to being learned, and I've never been good at memorizing. > >Structures come to mind, though they're not as bad as some things I've > >come across (can't recall what though). I thought I already gave > >that, but I guess I didn't. > > Perl doesn't have structures, it has hashes. Different concept. > They can be used to emulate a structure, but they are not structures. Precisely. Programming languages manipulate data, very often involving multiple types of information; data structures. This is a fundamental part of programming, so much so that it's taught to all first year CS students. Perl makes manipulating data structures harder than it needs to be. IMO, this is a weakness of Perl. I'm not saying Perl is a bad language. I am merely saying that I found/find it reletively difficult to learn, for reasons I've stated, and can definitely see why others balk at the prospect. Or said another way: I like perl. It makes shell scripting easier. =8^) - -- Derek Martin [EMAIL PROTECTED] - --------------------------------------------- I prefer mail encrypted with PGP/GPG! GnuPG Key ID: 0x81CFE75D Retrieve my public key at http://pgp.mit.edu Learn more about it at http://www.gnupg.org -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE9Ym+ndjdlQoHP510RAq1PAJ95+KuOUBvPAFS55FpPtk1NR1ZrvACgluAm M24a6F28uQcptmKQqixBCNQ= =isIU -----END PGP SIGNATURE----- _______________________________________________ gnhlug-discuss mailing list [EMAIL PROTECTED] http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss