Re: Proposal for updating the PDF-extension
| From: | Cynic | Date: | Wed, 24 Jan 2001 15:28:00 +0000 |
| Subject: | Re: Proposal for updating the PDF-extension | ||
| References: | 1 2 3 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-44901@lists.php.net to get a copy of this message | ||
+1 for PHP way on both questions. The language should be consistent.
I think one of the goals - a major one - of PHP (or any other
programming language, for that matter) should be:
provide a single, consistent interface to many different areas
of programmer's life. In other words, I think consistency is
what distinguishes a programming language from a pile of libs
quickly hacked together into something resembling Crude Puppy
rather than anything else.
At 17:16 24.1. 2001, Uwe Steinmann wrote the following:
--------------------------------------------------------------
>On Wed, Jan 24, 2001 at 03:07:09PM +0100, Cynic wrote:
>> maybe they should be pdf_find_font, pdf_add_local_link etc?
>> that would be more consistent with the func-naming convention,
>> I guess, but I'm in no position to decide this.
>> but I definitely think that it should be either underscore
>> everywhere, or just between the ext. prefix and the rest of
>> the name (i. e. pdf_findfont, pdf_injectasmanywordasyouseefit),
>> or whatever, but it should be consistent. that is, don't
>> mix pdf_open_file with pdf_add_locallink, because that only
>> confuse folks. and the consensus (at least I got it it's agreed
>> on) is pdf_add_local_link-like names.
> From the php point of view there should be underscores but
>the pdflib api doesn't use them except for the one after the 'pdf'.
>The question is, shall we enforce the php naming or allow the
>pdflib naming.
>
>There are probably other points which need to be discussed like
>what a function should return if it fails. Many php functions return
>false but pdflib's api requires to return -1.
>
> Uwe
>--
> Uwe.Steinmann@fernuni-hagen.de
> Tel: +2331 987 4528 Fax: +2331 987 375
------end of quote------
____________________________________________________________
Cynic:
A member of a group of ancient Greek philosophers who taught
that virtue constitutes happiness and that self control is
the essential part of virtue.
cynic@mail.cz