@Andy
> Why add comments?

The API extracts the comments from the code. Therefore, the function
should be comprehensively commented. Staying with the example of find,
without reference to the deprecated function findNeighbours, it is not
possible to see what parameters need to be passed without delving into
the source.

I spent an hour trying to get find('neighbors'...) to work. The
problem wasn't the American spelling, it was the 's' in fields.
Amongst others, there are two options, 'field' and 'fields' only one
of which is documented.

> Regarding deprecation of methods such as findAll findNeighbors etc.
> I would have thought it's obvious, but the new syntax ensures
> consistency.
>
I don't have an argument with the new syntax, but I'm beginning to
wonder if $html->element('css',array(...)) or
$form->fatuousAbstraction('create',array(...)) will become the norm.
The 'magic' methods make life easier, they make parameters easier to
remember, they make code easier to write which is surely the
underlying raison d'etre of CakePHP. Sure I can write wrappers myself,
but if they're already there and widely used why throw them away?

> There's no need to even glance at the api to know what params to pass.
> findAll, find, findNeighbors etc. each had different params, which
> means you can't know what to do without looking and/or remembering.
>
Not so - see above.

@Brian
> Anyway, I can't imagine any
>software framework worth its salt that didn't resort to deprecation
>from time to time. Whether it's for reasons of security or simply that
>new and better ways to do things come along, deprecation is the way to
>go.
>
And I wholeheartedly agree with you. But why deprecate the 'magic
functions' that are part of the culture? If the code behind the name
needs to be updated, okay, do it, but no need to throw it away.

The ultimate outcome of this is a one function class structure. In the
name of uniformity. Class::do('something',array(...)).

Anybody can write wrappers, but that is why people use frameworks - so
they don't have to.

>The bottom line, though, is that deadweight should be
>removed eventually.
But deadweight is dead. How many people actually use functions like
findAll ? I'll bet it's a lot. Probably close to the total number of
cakePHP users.

L


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to