Brad King wrote: > On 04/18/2014 03:07 AM, Rolf Eike Beer wrote: > > what about nuking at least all > > control characters and whitespace from variable names in 3.1? I don't > > think > > that anyone has used them on purpose, and accidentially using them will > > only cause trouble. > > If we're going to change this I don't want it to be part-way. We've > discussed before on this list that the proper solution is to make > auto-expansion and keyword recognition occur only for unquoted args > (with associated policy of course).
To forbid whitespace and control characters in variable names can IMHO only be
good. It would at least catch obvious errors because one hit the space bar
accidentially while typing the variable name, which could happen easily when
you are trying to compose the variable name from other variables:
set("${var} ${foo}" "some${var}")
So, yes, this new stricter variable naming could be "abused" as a better
workaround for the unwanted expansion. But I find it useful even without that
usecase. And while at it I suggest we forbid any of ${}() in variable names
also, since using them can only cause trouble. And maybe even everything non-
ASCII, too.
> There is nothing wrong with the "x" workaround in practice until
> a real solution can be implemented.
Right.
Eike
--
signature.asc
Description: This is a digitally signed message part.
-- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
