Re: Philosophical question

Поиск
Список
Период
Сортировка
От Chris Travers
Тема Re: Philosophical question
Дата
Msg-id CAKt_Zfv0Pc-RB6ksdqVeNSOcmUUCiT8MA+8TU-gNSv7s2-yzMA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Philosophical question  (Leif Biberg Kristensen <leif@solumslekt.org>)
Список pgsql-general
This is somewhat of a diversion but....

On Wed, Dec 14, 2011 at 4:25 PM, Leif Biberg Kristensen
<leif@solumslekt.org> wrote:
>  Onsdag 14. desember 2011 22.21.04 skrev Chris Angelico :
>> The biggest problem with PHP, imho, is actually that it's so easy to
>> use. Anyone can get a WYSIWYG editor, save as HTML, and have a web
>> page... and then all you need to do is rename it to ".php" and put
>> some special tags in it, and look! You have a dynamic web page and
>> it's so awesome! At least, it is until you try to go further, and you
>> start adding mess on top of mess on top of mess.
>
> In my opinion, that's a pretty elitistic view. Certainly, that's one way of
> writing PHP, but it isn't the only one. Quite a few of us have started with
> something like what you've outlined here, but have long ago moved on to more
> maintainable coding practices.
>
> The good thing about PHP is the low threshold, and you can start using it
> doing exactly what you outlined in your first paragraph. But somebody coming to
> PHP from any old procedural language, will soon find that PHP lends itself well
> to building function upon function, until you can really write the code you
> need to express anything you want.

I take a different view.

I actually think PHP is not a bad preprocessor for SGML documents.
The fact that it pretty much sucks for everything else doesn't
undermine that.  This is one of the reasons why I think PL/PHP really
should sit in a very tiny niche--- it could be very useful when
combined with the xml data type, but I can't think of any other really
defensible applications.

If you look at PHP solely as an SGML preprocessor, it's just fine.
However the further you get from this role, the more it breaks down.
If there is a big criticism of PHP to be had, its that it breaks down
too gracefully leading to programs written in the language which would
be far better written in other languages.  I can think of a few I have
written which would have been far better off written in Perl or
sed......

Hope this helps,
Chris Travers

В списке pgsql-general по дате отправления:

Предыдущее
От: Leif Biberg Kristensen
Дата:
Сообщение: Re: Philosophical question
Следующее
От: Craig Ringer
Дата:
Сообщение: Re: Vacuum and Large Objects