Python array syntax in PHP

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Dave Benjamin

    Python array syntax in PHP

    There was a recent proposal on the PHP-DEV list to add a syntax similar to
    Python's for arrays (in PHP, arrays serve as both lists and dictionaries,
    though usually not at the same time. ;) Though several of the language
    developers were marginally positive about the idea, I found it interesting
    how much of a controversy ensued.



    I'm really starting to think that much of a given language's style is
    arbitrary; the rationalization s come later, once the fear of change sets
    in.

    --
    ..:[ dave benjamin (ramenboy) -:- www.ramenfest.com -:- www.3dex.com ]:.
    : d r i n k i n g l i f e o u t o f t h e c o n t a i n e r :
  • David M. Wilson

    #2
    Re: Python array syntax in PHP

    Dave Benjamin <ramen@lackingt alent.com> wrote in message news:<slrnbr5se o.k6d.ramen@lac kingtalent.com> ...
    [color=blue]
    > There was a recent proposal on the PHP-DEV list to add a syntax similar to
    > Python's for arrays (in PHP, arrays serve as both lists and dictionaries,
    > though usually not at the same time. ;) Though several of the language
    > developers were marginally positive about the idea, I found it interesting
    > how much of a controversy ensued.[/color]

    I find it interesting that the lead arguments against the syntax are
    that of "there shouldn't be more than one way of doing things", and
    "this is an unnecessary change", coming from a development team who
    recently added iterators to their language after it had gone into
    beta.

    I promised myself that I would write an HTML hate-rant on PHP for my
    web site. I'll get around to it someday. Roughly, the conclusion would
    be:

    a) Don't ever touch PHP.

    b) Don't ever mention your PHP 'skills' or experience on your CV or to
    your friends. Rest assured someone will find a steaming pile of crap
    for you to work on.

    c) If you are handed an existing PHP project to work on, rewrite in
    another (say 'any other') language immediately. Don't port, you will
    only carry the satanic anti-structure of the PHP application with you.

    Rewrite all related documentation, schemas, and concepts. Don't spare
    a single byte - you won't be free of the curse until all the children
    are dead..

    d) Time and cost are no exception to c). If this argument is proposed,
    dispel it with: "how much time and cost will be involved in keeping
    this application maintained, and running on future PHP releases?"
    Shoot to kill if they don't accept this.

    Follow these simple steps and you will find true peace. :)


    David.

    Comment

    Working...