Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: "Obviously, You Will Need a Java Course..."

by indigo (Scribe)
on Apr 04, 2001 at 01:57 UTC ( [id://69491]=note: print w/replies, xml ) Need Help??


in reply to "Obviously, You Will Need a Java Course..."

I mean look at this : -
try { FileInputStream inStream = new FileInputStream( args[0] ); inStream = ("myFile.txt"); } catch(IOException ioerr) { System.out.println( ioerr.toString() ); }
and compare it with this :-
open(FH,"myFile.txt") or die "Nope : $!\n";
or this:
die "Nope : $!\n" unless open(FH,"myFile.txt");
or this:
if (not open FH, 'myFile.txt') { print STDERR "Nope : $!\n"; exit; }
or even this:
!open FH => 'myFile.txt' == 0 && die "Nope : $!\n";
Every one of those are (probably) valid Perl. And at a glance, they all look like they might kinda work. That's the tradeoff. A diagonal language like Perl, is terse and expressive, not only do you see the same thing done in several ways, you will revel in it. With orthogonal languages like Java, you code may be verbose and ugly, but everyone's code verbose and ugly in the same way, and there is less detective work involved.

It all depends on what you and your task need in a programming language. I like to think of Java as being egalitarian, where everyone writes the same code, and Perl as elitist, where you can soar with the eagles, or crash and burn like a flaming eagle who can't soar anymore.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://69491]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (7)
As of 2024-04-25 11:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found