Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
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.


In reply to Perl is a post-modern aesthetic language by cosimo

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (2)
As of 2024-04-24 23:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found