dereferencing a simple array reference
I always dereference with curly braces, AND whitespace! Sure, it's redundant, but it allows my tired old eyes to see what I just wrote.
keys %$href
keys %{ $href }
I have to squint a little to read the former; not so much on this page, but on the terminal, definitely. :-( But to each their own, eh?
The way forward always starts with a minimal test.
| [reply] [Watch: Dir/Any] [d/l] [select] |
He (Tom) ...
where do you expect to see white space ? Why should your expectations be different for other languages ( even artificial ones ) ?
You have been trained since your first exposure to printed English to very standardised use of white space . Are you suggesting we should throw away all that hard wired preprocessing and reinvent a whole ' nother wheel ? Have you even tried typing prose with " silly " white space ? It ' s actually quite slow because it ' s not at all " natural ". What ' s it like to read ? Do ( ( redundant ) ) or ( unnecessary ) brackets help ?
Premature optimization is the root of all job security
| [reply] [Watch: Dir/Any] [d/l] |
Well, besides the eyesight issue, there's the fact that I wasn't actually trained that way in Perl.
When I started at the University of RTFM I was looking at a lot of very ugly code. Lots of global vars up top, massive chunks of comments, lots of repeated lines to populate data, lots of report()/write() sections ... all the glories of Perl 4, Matt's Script Archive; it was ugly.
The first thing I used to do (and still do) was to put in a bunch of blank lines and spaces so I could see what was going on. I got used to writing that way, and maybe because of that, as you say, and maybe because it's intrinsically clearer, I find it it much easier to take in paragraphs of code at a time.
YMMV :-)
The way forward always starts with a minimal test.
| [reply] [Watch: Dir/Any] |