Re: Request to publish a package
| From: | Matthew Weier O'Phinney | Date: | Fri, 16 Jan 2009 17:11:20 +0000 |
| Subject: | Re: Request to publish a package | ||
| References: | 1 2 3 4 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-51444@lists.php.net to get a copy of this message | ||
On Fri, Jan 16, 2009 at 9:40 AM, Michael Rupp
<michael.rupp@gogol-medien.de> wrote:
> I would love to see such a "unified API" with all data types , and the
> names should be String, Integer and so on, because this is, what a
> developer expects form a language.
I'd hesitate to say that this is "what a developer expects from a
language." While you and I might like it (I <3 the fact that JS treats
all data types as objects), many, many developers are fine with using
PHP's low-level functions to manipulate the various data types (with,
perhaps, the exception of the various haystack/needle differences).
> And as namespaces are on its way, this should be no big problem in the
> future. It would be better though, to have these classes as a PECL
> package or in php itself due to performance reasons. What I like
> about such classes is the possibility to work strictly oo. you can use
> them for type hinting,
The argument against this is that PHP is a dynamic, loosely typed
language -- and adding such features change the very nature of the
language. Yes, strong typing can be useful, but the ability to use a
variable of indeterminate type in many different contexts is a key
strength of loosely typed languages.
> and save a lot of argument check code,
... and remove the ability to use duck typing.
I completely understand the motivations for doing this, but I caution
strongly against it. Work with PHP's strengths -- if they are not
suitable for the project at hand, find the language that better suits
your needs.
> you have a unified Interface to all functions, and not the (imho)
> confusing function calls of php. Perhaps it would make sense to set up
> a String interface, so everyone can easily use his favourite
> implementation. (Don't know if something like this can be part of a
> pear package though)
>
> -----Ursprüngliche Nachricht-----
> Von: till [mailto:klimpong@gmail.com]
> Gesendet: Freitag, 16. Januar 2009 14:36
> An: Daniel O'Connor
> Cc: Carter Lamb; PEAR Developers
> Betreff: Re: [PEAR-DEV] Request to publish a package
>
> On Thu, Jan 15, 2009 at 11:02 PM, Daniel O'Connor
> <daniel.oconnor@gmail.com> wrote:
>> You want http://pear.php.net/pepr/pepr-proposal-edit.php
>>
>> Just a side note: a class name like 'String' is unlikely to sit well with
>> many; because its so general and likely to have been created many times in
>> many existing projects.
>>
>> Also, this kind of class is primarily just syntax sugar (not necessarily a
>> bad thing), so you will cop a reasonable amount of heat for that.
>>
>
> I was gonna ask -- hooray for a unified API, but is this really necessary?
> =)
>
> @Carter: In general, all new packages have to go through the proposal
> process, which includes voting and feedback on your code/class.
>
> Till
>
> --
> PEAR Development Mailing List (http://pear.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
> --
> PEAR Development Mailing List (http://pear.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Matthew Weier O'Phinney
mweierophinney@gmail.com
http://weierophinney.net/matthew/