On Tuesday 29 June 2004 04:08 pm, Adrian Madrid wrote:
> I must admit I don't know perl but I can read python, java and tcl and
> I really have a hard time reading perl. I know php and work with it
> day and night but I don't think I can read perl. Does it mean that php
> is more readable than perl? you tell me. (BTW, python beats both hands
> down on this)

This is one thing that is often personal.  I for one have a very difficult 
time reading python.  The whitespace delimiting and conventions are quite a 
bit more difficult for me to follow.  "In the eye of the beholder".

> Sorry, but the language does not encourage you to do anything in any
> which way. Is it less line of code to do it that way? Yes. Do you call
> that encouragement? I don't. I call it lazyness.

>
> > 3) Narrowed scope.  By stripping out all features of Perl to make a new
> > language, it must be better.  Personally, even if I'm not using some of
> > Perls features in a web page, great, I still like having them for working
> > on non-web apps (yes, there are things other than html).  And somehow,
> > php must better at web apps because that's all it was designed for
> > (Professional Home Pages).  Excuse me, but other languages built on their
> > existing strengths to become even more powerful in the web environment. 
> > If you like PHP's style, you can use Mason or Embperl and be just as
> > powerful.  Or look at something like Maypole, TTK, Axkit in perl or
> > Struts, or tapestry in Java.
>
> There is a saying in spanish: "El que mucho abarca poco aprieta". You
> try to cover too much you end up doing it poorly, sorta. 

Sure, but that problem often comes from "biting off more than one can chew.  
Perl (and others) for example built their web kits on top of an already 
existing language.  Does that mean that they are bad for web, because it 
wasnt' the first priority.  No, in fact I like it more, because many of them 
built on solid foundations.  Sure php has cloned many of the great features 
of other languages, but other languages haven't been all just sitting around 
doing nothing.

> PHP is great 
> for web development. Do you want to cook up a site horrendously in 30
> minutes, you can, you can take all the shortcuts the language gives
> you. Do you want to use all the complex patterns you can think off,
> you can, there are plenty of examples (WACT, my own framework, etc).

But there are parts that it can't do, that's the problem.  In a web 
environment, can't you work directly with apache internals? can you embed 
directly into the apache lifecycle itself?  It's coming along in these areas, 
but if you really want that, you have a smaller number of choices.

> BTW, if you like Mason or Embperl you can use Smarty, Flexy, Savant,
> etc. What is your point? That perl can do all that php can do? Umhh,
> doh! 
The point is, a) you *should* use kits like that, and b) those that say php is 
better because it's designed for the web should look around some more.  Other 
languages do have all of that, and have had it for a long time. 

> The question is, which one do _you_ like the best? Which one 
> comes the easiest for you? I guess that's the real question.

Yes, that definately is the real question.  Personal choice/style is extremely 
important in choosing a language.  There is no single best answer for 
everyone, ever.

> Sorry, but again, either your knowledge of the language is limited or
> you go by what a lot of people do and not what can be done. 

No, from real experience with projects using several languages

> Even without considering PHP5, I have built applications that solve
> business problems using a framework that, IMHO, use the best and more
> useful patterns that Java fanatics boast about. And all that in lowly
> PHP. 

Yes, many things *can* be done correctly, but usually aren't, in any language.  
PHP just tends to have a community effort that encourages it to be done the 
quicker, usually incorrect manner.  All langauges have members of the 
community that encourage this, but whether it's the majority or not makes a 
difference.  For example, how many people have had most of their experience 
to Perl come from a "Matt's script archive" script, or somebody that learned 
Perl from it.  The stuff is horrendus.  Wrong in most every manner.  But the 
greater part of the community recognizes it, and tries to correct the wrong.  
Other languages have the same issues, and many have been lucky to get a head 
start from some of perls efforts (they saw the bad scripts, and blunted many 
before they became well known).

PHP does have members working on some of the more advanced features, and are 
making good progress, but I view the standard PHP methodology much as I view 
the appropriateness of using old CGI mode and print statements in Perl, 
Python, or other languages.  Nasty, old, and to be avoided 95% of the time.

> And I must admit that I probably wouldn't do it the way I do were 
> it not for the knowledge I have gained working with Java, TCL and
> Python in the different projects I have worked before.

Yes, that's important, the experience from other languages.  The problem 
usually lies in those people who don't have a taste of other languages, and 
believe that the way they see when learning must be the correct way for doing 
everything.
>
> I don't mean to be cocky or start a fight or anything. I'm just tired
> of people treating a language so simple and powerful that has allowed
> me to do so much in a despective way.

It's not so much the language, as the default community.  But that's the same 
reason I defend Perl.  It's my language of choice, after trying many.  It 
fits my persona best. But look at the number of people that will always claim 
something about readablity, performance, or similar misconceptions.  Python, 
ruby, whatever, will also usually get the same perceptions from other groups.

-- 
--
Jayce^

Attachment: pgpQjsCW9d8FU.pgp
Description: signature

____________________
BYU Unix Users Group 
http://uug.byu.edu/ 
___________________________________________________________________
List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list

Reply via email to