These days I was thinking that Perl, which is by no doubt my
preferred programming language, is also an
highly
aesthetical language.
If you look at
perl6 language (off-site), several discussions about core language
grammar and features can be cut down to "language aesthetical beauty". While someone talks about a syntax and tells that it is
nice and clean, some other says that one expression
looks ugly, ...
What I think is that I like to express my perly style
through code reformatting and "tuning" to make it look
nice, clean and expressive.
Probably an example can clarify my confused ideas.
The following code, for my own personal perl aesthetic taste, is awfully ugly:
my $i=0;
for( $i=0; $i<=$n; $i++ ) {
$list[$i] = &foo(1, 2, 3, 4, 5);
if( $#list > &max_length )
{
last;
}
my $result = &bar("$n", @list);
if( $result > 999.999 )
{
print STDERR "System halt";
exit;
}
}
I surely prefer something like:
for( 0 .. $n )
{
push @list, foo(1 .. 5);
last if @list >= max_length();
warn('System halt') and exit if bar($n => @list) > 999.999;
}
In fact, I really hate those &function_calls(), the use of double quotes around "$scalars" (if they don't have a special meaning), and so on...
What is special and wonderful about Perl is that you can express your own style, very much like spoken language.
Trying to apply your personal stylish influence to Java, or (worse) to Python (which BTW is a wonderful language) IMHO just won't make sense...
(no language flames should start from here :-)
Another sub-meditation: isn't Perl6 design highly influenced by aesthetical appearance ?
Janitored by davido: Changed pre tags to code tags, and turned link into a PerlMonks style link.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.