On Tue, 2003-06-10 at 16:34, Sparky Kopetzky wrote:
> Ok - let the war begin...
>
> Question: Why doesn't the PHP community support using an Hungarian
>  style of programming if it prevents errors?? I've gotten too darn many

Haven't really seen this one flamed over on this list before, but maybe
someone will step in an freak out later on. At any rate, you make the
assumption here that Hungarian notation somehow inherently prevents
errors. This is believed by some to be true, and by others, to be
false. Hungarian notation does provide a set of tools for helping to
prevent errors, true--but any proper coding convention does that. Past
that, there is little to choose between them except personal
preference.

There are compelling arguments both for and against any given
convention, and all have their adherents. In the end, one must be
chosen--and for this project, one has been. Personally, I think it is
an excellent choice. 

>  times now by a type mismatch using what the 'Bible' of PHP programming
>  style recommends - PHP Coding Standard by Fredrik Kristiansen. I'm
>  sorry - $MonkeyBrains doesn't tell me anything about what type is or
>  what type it holds. $intMonkeyBrains DOES and I can tell instantly
>  that $intValue shouldn't hold $strValue without a type coersion. (I
>  know PHP will blindly stick the string in and replace the integer...)

That's the price of a loosely-typed language. Buys you more than it
costs IMHO, but I understand if you differ. :) 

> Question: Is there a better way in classes to access/modify var's other
>  than get_var, put_var functions? Works great for me and I know whether
>  I'm saving a variable or accessing it. Sure, I'd like to be able to
>  use a VB style Set/Get property but who wouldn't??

Well, you could check out the experimental overload extension at
http://www.php.net/manual/en/ref.overload.php, which may be what you're
looking for. Otherwise, just be careful with your references to try to
keep array/object copies down, and use accessor methods.

> Feel free to email me directly if this will generate a firestorm in the
>  maillist.

Well, at least you didn't mention emacs or vi. ;)



Regards,

Torben

-- 
 Torben Wilson <[EMAIL PROTECTED]>                        +1.604.709.0506
 http://www.thebuttlesschaps.com          http://www.inflatableeye.com
 http://www.hybrid17.com                  http://www.themainonmain.com
 -----==== Boycott Starbucks!  http://www.haidabuckscafe.com ====-----




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to