*This message was transferred with a trial version of CommuniGate(tm) Pro* Hi,
JR said: > I guess this could be true. But I don't understand why someone would need > an "easy" way to identify variables? Why not an easy way to identify > function names? Or constants? For big projects and/or safety critical projects it is very convenient to make a clear differentiation betwen them. In fact, the "coding standard" I use for those projects is: v_name is a variable vg_name is a global variable (of course the use of global variables should be minimized) f_name is a function c_name is a constant e_name is an enumerated value t_name is a type ... maybe more You may think it is confusing, a waste of time, or whatever, but believe me you get used to it very quickly and becomes very natural. Note that using this standard is relatively easy to write your own tools for code static analysys or just to performs searchs, substitutions, etc. Rasmus said: > It also means you can have variables that are the same name as function > names. In my opinion this is not an advantage at all. When I read code (clearly when it is not your own) I want to know if this is a function or a variable or a constant. Anyway, if your are calling a function you should always use the opening and closing brackets. I guess PHP is not usually used for safety critical projects, but if I have to develop such a project in the web I would PHP, of course, and the first thing I would do is to write a coding standards document with these and more restrictions. When PHP is used for big projects, with several programmers involved, programming-in-the-large, coding standards are required. Having said that, my PHP projects are quite big and I don't use any of those standards :-) (my excuse is that it is just me programming) Pedro. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php