I still don't like the article.If I'd said I like the article and think that everyone should read it at least twice a year, I'd be doing some kind of advocay, so I won't.
Let's do it in Perl.No, I don't think Perl is suitable for discussing algorithms. It has too much syntax. Just look at Perlmonks. Whenever someone asks how something can be done faster, a dozen or so variations on the same theme are posted - all using different syntax to do the same. Seldomly someone actually looks at the algorithm because we're all too busy looking at the syntax.
Mastering Algorithms with Perl is another example. Too often the authors side-step their discussion of algorithms to bother with syntax. Either to explain the syntax, or to show another cool trick.
Knuth's choice for MIX was much better. Not only doesn't he commit to a language-du-jour (he began his work in the 60s and is still working on it, should he have use FORTRAN, Pascal, C, C++, Java, .NET?), he never has to step back from explaining the algorithms to discuss syntax. Granted, MIX might have taken it a bit to the extreme, but his new volumes will use MMIX, and will still be simple compared to languages like Perl, Java or C.
The author goes on to describe discussions he has had with students regarding the differences between strongly typed languages and Perl.Students? I've had the honour of hearing Dominus giving one those talks he refers to. They were given for people Perl users. People that know Perl.
The full quote is: In my world you use what works, and using PHP can't possibly reflect badly on Perl. I don't see how your comments relate to this. Jasmine used PHP, and that works. Whether or not it's modular, or small, or highly utilized or cost efficient doesn't matter. The PHP solution works, and than cannot reflect badly on Perl."..using PHP can't possibly reflect badly on Perl"True. I agree with this statement only if a) the original system design was not modular b) the original system was relatively small but had high utilization and cost considerations make this necessary.
If you designed a web based system using dozens of custom Perl modules that would take time and effort to port to a different language it makes sense to attempt to upgrade the code to mod_perl (or something similar) before trying anything else. Otherwise you are needlessly spending time and money to retest business logic that could be better spent on performance.Well, yes. But what does that have to do with the discussion? If I have a web based system using dozens of Java classes, it will take time and effort to port it to a different, and it will make sense to upgrade the code to Websphere or Tomcat before trying anything else. Idem if the application is written in .NET, C++ or Python.
If I try something in Perl and find that the same thing works better in PHP or whatever my next line of questioning is 'why'? The bad discipline, the one I think the author is really talking about, is to stop there.No, I don't think the author is really talking about stopping here. The author isn't addressing the person using PHP instead of Perl. The author is addressing the people who criticize the person using PHP instead of Perl.
But when I dig (mostly because it is FUN to do so) I find that there is no module or the existing one needs a rewrite. Now I am doing the homework, the foundation of 'good' advocacy. It is harder. It takes more time.And it's reinventing the wheel. If a good solution exists, use that. Don't shy away from it just because it has the wrong colour skin.^W^W^W^W^W was written in the wrong language.
The same argument can be made for Charles Darwin's evolutionary theory or Einstein's stand on Quantum Mechanics. A debate on these continues to this day. If we didn't have strong advocates, who would we look for when we wanted a good argument?No, that's not the analogy of what we've been discussing. It would be more like rejecting Einstein's theory of relatively because it was written in German, and not in English. Dominus wasn't talking about people rejecting (or scolding at) solution written in PHP because the solutions are bad - no, he discusses rejecting PHP for no other reason than that it isn't Perl. Einstein didn't reject the Newtonian view of the world because Newton had written his Principia in Latin, nor did he disagree with Quantum Mechanics because Niels Bohr was Danish.
Larry Wall is a great example that supports my point.Does he? Let me quote Dominus's quote at the end of his article:
I have a book on my bookshelf that I've never read, but that has a great title. It says, "All Truth is God's Truth." And I believe that. The most viable belief systems are those that can reach out and incorporate new ideas, new memes, new metaphors, new interfaces, new extensions, new ways of doing things. My goal this year is to try to get Perl to reach out and cooperate with Java. I know it may be difficult for some of you to swallow, but Java is not the enemy. Nor is Lisp, or Python, or Tcl. That is not to say that these languages don't have good and bad points. I am not a cultural relativist. Nor am I a linguistic relativist. In case you hadn't noticed. :-)You know who wrote this, don't you?
In reply to Re: But I WANT to do everything in Perl!
by Perl Mouse
in thread But I WANT to do everything in Perl!
by InfiniteSilence
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |