Re: [PHP-DEV] Fw: [PHP-DOC] cfunction?

2001-04-26 Thread Andi Gutmans

At 01:28 PM 4/26/2001 -0700, Rasmus Lerdorf wrote:
> > >Leave one, at least.  We want to know if this breaks.  At some point we
> > >will want to remove the feature from php, and then we can remove the test
> > >case.  But let's not remove testcases without removing the feature.  The
> > >test scripts are not meant as examples for users.
> >
> > It won't break and if it does, all the better :)
> > As you see people do take example from the test cases if they are meant to
> > be testcases or not.
>
>Yes, but the thing is there because there are scripts that use it.  If we
>break it, then these scripts will break.  Therefore a test case should
>remain so we don't break it.  If you are worried about the testcase
>setting a bad example, stick a comment in there.  You don't remove test
>cases for features just because you don't like them.  If it is part of the
>language, it needs to be part of the regression testing.

Check zend_language_scanner.l for cfunction and you'll see why there is 
about a zillion times more chances that someone will discover cfunction 
from the test scripts then there is for cfunction to break without regular 
functions breaking too. So I think we can take our chances on this one.
Come on, it's really bullshit and we should have nuked cfunction a while ago.
If you really feel strongly about it then go ahead and put one back 
although I think it's OK the way it is now.

Andi


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] Fw: [PHP-DOC] cfunction?

2001-04-26 Thread Rasmus Lerdorf

> >Leave one, at least.  We want to know if this breaks.  At some point we
> >will want to remove the feature from php, and then we can remove the test
> >case.  But let's not remove testcases without removing the feature.  The
> >test scripts are not meant as examples for users.
>
> It won't break and if it does, all the better :)
> As you see people do take example from the test cases if they are meant to
> be testcases or not.

Yes, but the thing is there because there are scripts that use it.  If we
break it, then these scripts will break.  Therefore a test case should
remain so we don't break it.  If you are worried about the testcase
setting a bad example, stick a comment in there.  You don't remove test
cases for features just because you don't like them.  If it is part of the
language, it needs to be part of the regression testing.

> I think for 4.1 we should nuke cfunction and possible also old_function.
> Don't forget that cfunction had a very very short live-time in the beta's
> of PHP 3. We made the function<->old_function switch pretty early.

That's a completely separate issue.  And I agree that the feature and the
test case should be removed.

-Rasmus


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] Fw: [PHP-DOC] cfunction?

2001-04-26 Thread Andi Gutmans

At 12:51 PM 4/26/2001 -0700, Rasmus Lerdorf wrote:
> > At 09:41 PM 4/26/2001 +0200, Hojtsy Gabor wrote:
> > > > > This is a question for the php-dev people too.
> > > > > What are the other hidden features not documented
> > > > > like this?
> > > >
> > > > Check the code.  This is simply a legacy feature there only for 
> backward
> > > > compatibility and should not be documented as we don't want people 
> writing
> > > > new scripts that use cfunction.
> > >
> > >Then why it is used in some scripts in the test dir
> > >in the distribution?
> >
> > It shouldn't be. I'll fix those.
>
>Leave one, at least.  We want to know if this breaks.  At some point we
>will want to remove the feature from php, and then we can remove the test
>case.  But let's not remove testcases without removing the feature.  The
>test scripts are not meant as examples for users.

It won't break and if it does, all the better :)
As you see people do take example from the test cases if they are meant to 
be testcases or not.
I think for 4.1 we should nuke cfunction and possible also old_function. 
Don't forget that cfunction had a very very short live-time in the beta's 
of PHP 3. We made the function<->old_function switch pretty early.

Andi


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] Fw: [PHP-DOC] cfunction?

2001-04-26 Thread Rasmus Lerdorf

> At 09:41 PM 4/26/2001 +0200, Hojtsy Gabor wrote:
> > > > This is a question for the php-dev people too.
> > > > What are the other hidden features not documented
> > > > like this?
> > >
> > > Check the code.  This is simply a legacy feature there only for backward
> > > compatibility and should not be documented as we don't want people writing
> > > new scripts that use cfunction.
> >
> >Then why it is used in some scripts in the test dir
> >in the distribution?
>
> It shouldn't be. I'll fix those.

Leave one, at least.  We want to know if this breaks.  At some point we
will want to remove the feature from php, and then we can remove the test
case.  But let's not remove testcases without removing the feature.  The
test scripts are not meant as examples for users.

-Rasmus


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] Fw: [PHP-DOC] cfunction?

2001-04-26 Thread Rasmus Lerdorf

> > > This is a question for the php-dev people too.
> > > What are the other hidden features not documented
> > > like this?
> >
> > Check the code.  This is simply a legacy feature there only for backward
> > compatibility and should not be documented as we don't want people writing
> > new scripts that use cfunction.
>
> Then why it is used in some scripts in the test dir
> in the distribution?

The whole point of the test dir is to make sure no legacy bugs creep in.

-Rasmus


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] Fw: [PHP-DOC] cfunction?

2001-04-26 Thread Andi Gutmans

At 09:41 PM 4/26/2001 +0200, Hojtsy Gabor wrote:
> > > This is a question for the php-dev people too.
> > > What are the other hidden features not documented
> > > like this?
> >
> > Check the code.  This is simply a legacy feature there only for backward
> > compatibility and should not be documented as we don't want people writing
> > new scripts that use cfunction.
>
>Then why it is used in some scripts in the test dir
>in the distribution?

It shouldn't be. I'll fix those.

Andi


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] Fw: [PHP-DOC] cfunction?

2001-04-26 Thread Hojtsy Gabor

> > This is a question for the php-dev people too.
> > What are the other hidden features not documented
> > like this?
>
> Check the code.  This is simply a legacy feature there only for backward
> compatibility and should not be documented as we don't want people writing
> new scripts that use cfunction.

Then why it is used in some scripts in the test dir
in the distribution?

Goba
... . . .  .  .
Editor of the Hungarian PHP manual, Admin of the Hungarian PHP mirror


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] Fw: [PHP-DOC] cfunction?

2001-04-26 Thread Rasmus Lerdorf

> This is a question for the php-dev people too.
> What are the other hidden features not documented
> like this?

Check the code.  This is simply a legacy feature there only for backward
compatibility and should not be documented as we don't want people writing
new scripts that use cfunction.

-Rasmus


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Fw: [PHP-DOC] cfunction?

2001-04-26 Thread Hojtsy Gabor

This is a question for the php-dev people too.
What are the other hidden features not documented
like this?


- Original Message - 
From: "Hojtsy Gabor" <[EMAIL PROTECTED]>
To: "PHP-DOC lista" <[EMAIL PROTECTED]>
Sent: Thursday, April 26, 2001 7:29 PM
Subject: [PHP-DOC] cfunction?


> Hi!
> 
> One interesting question dropped in on the hungarian php
> mailing list. There is an example file bundled with PHP:
> 
> /php-4.0.4pl1/tests/classes/class_example.phpt
> 
> The piece of code:
> 
> 
> /* pretty nifty object oriented code! */
> 
> class user {
>   var $first_name,$family_name,$address,$phone_num;
>   cfunction display()
>   {
> echo "User information\n";
> echo "\n\n";
> 
> 
> 
> But what is cfunction It is not documented...
> 
> Goba
> ... . . .  .  .
> Editor of the Hungarian PHP manual, Admin of the Hungarian PHP mirror
> 
> 
> 


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]