On 12/05/2012 1:44 PM, Hamish wrote:
curly bracket quoting like ${FOO} does not add to safety! actually
it hurts it as it gives a false impression that it is doing something,
so makes real bugs harder to spot. The main place you'd use that is
to protect the variable name from following chars like "${FOO}_bar"
or where it justifiably aids readability.

Hamish,
I have a mild preference for use of ${FOO} instead of $FOO, mainly due to a history of working on projects where use of curly brackets were part of the coding conventions. I think the original logic was that if you use curly brackets some times, (in case of ${FOO}_bar), then you should be consistent and use it always. But as noted, this is only a minor preference of mine, and I'm ok with changing (when I remember to do so).

--
Cameron Shorter
Geospatial Solutions Manager
Tel: +61 (0)2 8570 5050
Mob: +61 (0)419 142 254

Think Globally, Fix Locally
Geospatial Solutions enhanced with Open Standards and Open Source
http://www.lisasoft.com

_______________________________________________
Live-demo mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/live-demo
http://live.osgeo.org
http://wiki.osgeo.org/wiki/Live_GIS_Disc

Reply via email to