[drupal-devel] Why the object notation?

Gerhard Killesreiter killesreiter at physik.uni-freiburg.de
Thu Jul 28 05:31:43 UTC 2005



On Thu, 28 Jul 2005, Karoly Negyesi wrote:

> Drupal code uses object notation very often and I fail to see why it's
> better than associative arrays. We get $_POST data in arrays so we need to
> convert back and forth.
>
> We never use the class construct. So why the -> ?

1) Dries prefers it
2) I prefer it too since -> is less typing than ['']

(-> is two keystrokes for me, [''] is eight)

Cheers,
	Gerhard




More information about the drupal-devel mailing list