Re: [PHP] Protecting variables and functions? Like C#
- Original Message - From: "Tim" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, September 19, 2001 9:35 AM Subject: Re: [PHP] Protecting variables and functions? Like C# > Private methods and variables are necessary for any serious language > that supports class libraries, IMHO. There are currently some manual > methods (i.e. naming conventions) of accomplishing this, but for the > best results it should be enforced by the compiler/interpreter. If in fact the language is interpreted and is in plain text then private functions are only there to keep the programmers from shooting themselves in the foot. When distributing compiled or encoded libraries then private functions become a good feature, since internal functions/methods that are subject to upgrades are not exposed to the end programmer. Mark C. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Protecting variables and functions? Like C#
thanks for the info! :-) Neil Kimber <[EMAIL PROTECTED]> schreef in berichtnieuws [EMAIL PROTECTED] > Private variables will be included in Zend 2.0 (99% likely) > From what I've seen private functions will not be included. > > Protected (ala Java/C#) variables and functions aren't being considered yet. > > > -Original Message- > > From: Jason Stechschulte [mailto:[EMAIL PROTECTED]] > > Sent: 19 September 2001 15:13 > > To: Emile Bosch > > Cc: [EMAIL PROTECTED] > > Subject: Re: [PHP] Protecting variables and functions? Like C# > > > > > > On Wed, Sep 19, 2001 at 03:24:31PM +0200, Emile Bosch wrote: > > > thanks tim, but do you know wheter they are gonna implement > > such a feature > > > cuz that's somethgin that the language actually must have to > > become really > > > professional or somethign. > > > > The language is already quite professional. Yes a feature like that > > would be nice in the eyes of many people, but saying it is a must and is > > needed to make the language professional is quite a joke. > > > > -- > > Jason Stechschulte > > [EMAIL PROTECTED] > > -- > > 'Course, that doesn't work when 'a' contains parentheses. > > -- Larry Wall in <[EMAIL PROTECTED]> > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Protecting variables and functions? Like C#
Private methods and variables are necessary for any serious language that supports class libraries, IMHO. There are currently some manual methods (i.e. naming conventions) of accomplishing this, but for the best results it should be enforced by the compiler/interpreter. Some might also say that strong typing (or at least more formal typing) is a requirement, but I'm quite happy without all the related hoops that C++/Java makes you jump through...that alone is enough to give the average PHP developer a big boost in productivity vs. those languages. :) :) - Tim http://www.phptemplates.org On Wed, 2001-09-19 at 10:13, Jason Stechschulte wrote: > On Wed, Sep 19, 2001 at 03:24:31PM +0200, Emile Bosch wrote: > > thanks tim, but do you know wheter they are gonna implement such a feature > > cuz that's somethgin that the language actually must have to become really > > professional or somethign. > > The language is already quite professional. Yes a feature like that > would be nice in the eyes of many people, but saying it is a must and is > needed to make the language professional is quite a joke. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Protecting variables and functions? Like C#
Private variables will be included in Zend 2.0 (99% likely) >From what I've seen private functions will not be included. Protected (ala Java/C#) variables and functions aren't being considered yet. > -Original Message- > From: Jason Stechschulte [mailto:[EMAIL PROTECTED]] > Sent: 19 September 2001 15:13 > To: Emile Bosch > Cc: [EMAIL PROTECTED] > Subject: Re: [PHP] Protecting variables and functions? Like C# > > > On Wed, Sep 19, 2001 at 03:24:31PM +0200, Emile Bosch wrote: > > thanks tim, but do you know wheter they are gonna implement > such a feature > > cuz that's somethgin that the language actually must have to > become really > > professional or somethign. > > The language is already quite professional. Yes a feature like that > would be nice in the eyes of many people, but saying it is a must and is > needed to make the language professional is quite a joke. > > -- > Jason Stechschulte > [EMAIL PROTECTED] > -- > 'Course, that doesn't work when 'a' contains parentheses. > -- Larry Wall in <[EMAIL PROTECTED]> > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Protecting variables and functions? Like C#
On Wed, Sep 19, 2001 at 03:24:31PM +0200, Emile Bosch wrote: > thanks tim, but do you know wheter they are gonna implement such a feature > cuz that's somethgin that the language actually must have to become really > professional or somethign. The language is already quite professional. Yes a feature like that would be nice in the eyes of many people, but saying it is a must and is needed to make the language professional is quite a joke. -- Jason Stechschulte [EMAIL PROTECTED] -- 'Course, that doesn't work when 'a' contains parentheses. -- Larry Wall in <[EMAIL PROTECTED]> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Protecting variables and functions? Like C#
thanks tim, but do you know wheter they are gonna implement such a feature cuz that's somethgin that the language actually must have to become really professional or somethign, i wish i could do cprogramming myself cuz then i would have implemented it a long time ago :-) Seen ur site by the way, looks a promising template system! Warm regards, Emile Bosch Tim <[EMAIL PROTECTED]> schreef in berichtnieuws [EMAIL PROTECTED] > This would certainly be a nice feature to have, especially if you've > done any development with Java or C++ in the past. > > Many PHP class authors adopt a convention that variables or functions > that start or end in an underscore ("_") should be treated as private > and used at your own risk, i.e. they may change in a future release of > the class or not work properly/safely when accessed directly. > > - Tim > http://www.phptemplates.org > > On Wed, 2001-09-19 at 09:00, Emile Bosch wrote: > > I am a huge fan of php but i am kinda scared by c# i really like it's > > ability to make functions and variable not accessible and therefore force > > the user to use a function instead of accessing it indirectly. > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Protecting variables and functions? Like C#
This would certainly be a nice feature to have, especially if you've done any development with Java or C++ in the past. Many PHP class authors adopt a convention that variables or functions that start or end in an underscore ("_") should be treated as private and used at your own risk, i.e. they may change in a future release of the class or not work properly/safely when accessed directly. - Tim http://www.phptemplates.org On Wed, 2001-09-19 at 09:00, Emile Bosch wrote: > I am a huge fan of php but i am kinda scared by c# i really like it's > ability to make functions and variable not accessible and therefore force > the user to use a function instead of accessing it indirectly. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Protecting variables and functions? Like C#
I am a huge fan of php but i am kinda scared by c# i really like it's ability to make functions and variable not accessible and therefore force the user to use a function instead of accessing it indirectly. I am talking here about class talk { private function bla() { } } $t = new talk(); $t->bla(); /* Produces an error cuz of calling a private function */ Is something like that gonna be implemented in the future? And maybe with a setting or somethgin, PHP strict=true? i don't know.. Warm regards, Emile Bosch -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]