Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

To make a more compelling case that "Ruby destroys flow", you need to analyse some specific code examples.

To give an illustrative example, in this Builder AU interview, Damian Conway analyses a Java program that prints "Hello World":

Programming in Java always feels like a chore to me, because the language so often gets in the way of the problem you're trying to solve. The cliched example is, of course, the well-known exercise of getting a language to print "Hello World". In Java, that's:

class HelloWorldApp { public static void main(String[] args) { System.out.println("Hello World!"); } }
It's a cheap shot to point out how syntactically overburdened that is, but it does illustrate a far more important point: that it's *cognitively* over-burdened too.

To get the job done (i.e. print out a simple greeting), the Java programmer needs to understand the concept of classes, Java's particular class mechanisms and class declaration syntax, the concept of methods, Java's method syntax, the general concept of types, the specific concept of a void type, the concept of parameters and return types, Java's type and parameter syntaxes, the concept of arrays and Java's array declaration syntax, the concept of static methods, the concept of public class members, the concept of -- and Java syntax for -- method calls, the notion that method calls can return other objects which can then have method calls applied to them, the concept of class methods, the notion of a System class aggregating all system interactions, the concept of an I/O class mediating input and output, and the fact that "println" is an abbreviation for "print line".

And *then* you can print "Hello World".


In reply to Re: Ruby vs Perl vs LISP; the killer feature lacking in Ruby by eyepopslikeamosquito
in thread Ruby vs Perl vs LISP; the killer feature lacking in Ruby by filesurfer

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 rifling through the Monastery: (7)
As of 2024-04-18 03:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found