On Sun, Jul 30, 2006 at 03:47:38AM +0900, M. Edward (Ed) Borasky wrote:
> Chad Perrin wrote:
> >I pretty well loathe the Perl object model, and the syntax for
> >references could use some work, but object oriented programming isn't
> >the whole world of programming -- and Perl handles a lot of things with
> >more elegance than most other languages (such as lexical closures, which
> >are, frankly, slightly less clunky than Ruby's closures).  Ruby does a
> >lot of things better than Perl, but there are some significant
> >shortfalls, too.
> >  
> I don't think I've ever needed lexical closures. The structure of most 
> of the code I write comes from the application domain rather than the 
> language. My main application domain is extracting performance data from 
> various text files and making coherent analytical models from it. A 
> combination of Perl 4, R, and relational databases is what I've evolved 
> over the years to do that, and that's the code I write and maintain on a 
> daily basis.

That's kind of a specious argument.  Similarly, one never really needs
switch/case statements -- you could always do it with if/else.  In fact,
you don't need if/else either -- you could just do it with a series of
carefully crafted if statements.  If that ends up being too ugly for
you, there's always the option of creating a block from which you use
break statements (or equivalent for your language of choice) to
approximate elses.

. . . but it's awfully convenient to have else and, occasionally,
switch/case statements.


> 
> >The notable thing that jumped out at me about Ruby when I discovered it
> >is this: Between Perl and Ruby, I don't need to learn Python at all.
> >I'm awfully glad for that, since Python basically makes my eyes bleed.
> >Call it a personal failure if you like -- it is definitely at least
> >mostly personal bias -- but that's the way it is.
> >  
> But I already know Perl ... my original comment was that I needed to 
> unlearn it to learn Ruby. It's mostly syntactic -- curly braces, 
> semicolons, scalars beginning with dollar signs, etc. I *never* liked 
> the Perl dollar sign/at sign/percent sign syntax convention.

. . . and my point is that you shouldn't have to "unlearn Perl", and I
find it shortsighted and narrow to make that kind of statement with any
seriousness.


> 
> Actually, there *is* one true language. It's called the "formal 
> semantics of programming languages". :) But more to the point, I think 
> there are far too many "general purpose" programming languages.

That sounds vaguely similar to the ridiculous arguments I hear from
Microsoft-fanboys who disparage the variety of GUIs available for Linux,
and the number of distros.  You're welcome to pretend you live in a
monoculture world, but please don't do anything to convince anyone else
to agree with your fewer-choices-is-better approach to programming while
I'm in the world.  I like having options.  What's to stop Python from
winning the choice-elimination war?  I'd find programming considerably
less enjoyable.


> 
> A working programmer needs to know C, plus whatever languages are used 
> in his or her shop. Regardless of what the designers and communities for 
> those other languages intend(ed) them to be, they are in fact occupying 
> an economic niche. They are special-purpose languages by that definition.

Really?  Funny, I've known quite a few excellent professional
programmers who never learned more C than is taught in a Programming 101
course, and a few that didn't even learn that much.  They seem to get by
just fine.  Perhaps you should define your use of "working programmer".


> 
> In this sense, Ruby is on the edge of becoming a special-purpose 
> language as the engine underneath Rails. I don't have strong opinions 
> about whether that's good or bad, but I do have a strong opinion that it 
> is the economic niche that Ruby will occupy for the foreseeable future.

I don't see that happening.  I see Rails getting a lot of attention, and
many people being attracted first to it then, by way of Rails, to Ruby
in general.  Ultimately, people seem to be getting enamored with the
language, with Rails as merely the "gateway drug".  The number of people
I've run across who do one project in Rails, then go on to use Ruby
without ever touching Rails again, outnumbers the people who come to
Rails and don't continue to use Ruby for anything else.


> >  
> I once wrote a program in Java. This was in 1996 or thereabouts, and my 
> reasons for using Java were:
> 
> 1. It would run on Windows and all the flavors of UNIX that I was 
> dealing with at the time. Visual Basic only runs on Windows.
> 2. It had hashes, garbage collection, a reasonable object model, and 
> useful compile-time error checking.
> 3. It was faster than Perl for number crunching.

Those are good reasons.


> 
> Java was a new language at the time -- I think it was Java 1.1. It was 
> certainly before Swing, Java 2, etc. I've never had an opportunity to do 
> any more Java programming, so I don't know how it is to the folks who 
> use it for a living. What I *do* know, however, it that there are a 
> *lot* of high-quality applications written in Java.

That's true, too.  I still don't like it -- and, in many cases, I think
Java was chosen for those applications because of the excellent
marketing Java has received, rather than because Java was the Right Tool
For The Job.  Some of those applications might have been better written
using other languages.  That doesn't mean they're bad apps, though.


>
> >I think that's quite enough off-topic rambling for one email.  The point
> >of this last bit of nattering on, if it can be said to have a real
> >point, is that every (reasonable) language has its advantages and
> >disadvantages.
> Even macro assembler? :) This *is* about performance, right?

Yeah, even macro assembler.  I'll leave that work for someone else, for
the time being: it's not my cup of tea.

-- 
CCD CopyWrite Chad Perrin [ http://ccd.apotheon.org ]
"A script is what you give the actors.  A program
is what you give the audience." - Larry Wall