Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'm the author - please allow me to clarify.

1) These are some hastily tossed off thoughts on a Sunday afternoon; not a manifesto. Quite happy to be taken to task on any of the points.

2) PHP is a perfect beginner language. Having tried everything from C, ASM, Java, Prolog, Java etc - I'd much rather play around in PHP. Ruby is similar - it's a well designed language with fairly little cruft - but I've limited experience in it.

3) As I say - most should be obvious. Yet most APIs aren't well designed.

4) Primarily, I'm looking at this from the POV of someone who spends a lot of time at hackdays. Yes, if you've got a week to learn the API, it doesn't really matter how your provide the API. But if you want people to get started quickly, provide as many languages and good libraries as possible.

5) You're probably right about the Wikipedia example. I think Apigee provides a nicer way of looking at a response.

Thanks for the link to Parse - looks interesting.

To reiterate - these aren't designed as a concrete example of best practice, just a way of looking at the problem which I don't think many people have considered.

Thanks for the comment - I may update the piece to reflect some of your very fair criticisms.

T



Try python - it would blow your mind. For 7 years, I too was a PHP believer for its simplicity. It was my favorite language by far. 1.2 year ago, I started to use python and was hesitant with it at first. As I worked more and more in python, I simply fell in love it. It does lot of greats things that PHP does (dynamic arrays, dictionaries, and functional programming) and adds lot more functionality that PHP is missing.

1. How would you add a new element to an array? PHP: array[] = 2 Python: array += [2]

2. How to combine 2 arrays? PHP: ?? array_merge(...) ?? Python: array += array <- it is as simple as appending to a string.

Lot more fun examples: http://python.net/~goodger/projects/pycon/2007/idiomatic/han...


> PHP is a perfect beginner language.

I don't really agree although I don't really care either, but "simple" and "logical" it is not. In fact, all three rules I quoted from your text (and likely a bunch of others, those three just jumped at me) are repeatedly broken in PHP's standard library (and for no good reason besides historical).

> Ruby is similar - it's a well designed language

Ruby is not that well designed, but design-wise PHP is utter dreck. That is the issue I take with your introduction: PHP the language is not designed, is not logical and is not simple (although they've been trying to fix some of the most egregious issues in 5.x, 5.4 finally allowed `foo()[$index]` for instance); and PHP's standard library is a complete mess of inconsistencies and redundancies.


2) PHP is a perfect beginner language. Having tried everything from C, ASM, Java, Prolog, Java etc - I'd much rather play around in PHP. Ruby is similar - it's a well designed language with fairly little cruft - but I've limited experience in it.

PHP is good for a beginner because it has very little ceremony, an ALGOL-like syntax and a big standard library, but you can't say it doesn't carry cruft: it has a lot of bad decisions that can't be changed for backward compatibility, particularly the rampant inconsistency (both in the language and in the stdlib) and the kitchen sink of the global namespace.

I liked PHP until I learned Python. It's certainly not perfect, but at least it actually follow some rules.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: