On 19. Nov, 2009, at 15:06 , Jed Brown wrote:
Michael Wild wrote:
Not sure I'd like that... Instead of being more expressive, I think
this
would be very confusing.
This is not a some magic beast coming out of functional languages. In
fact, it's pretty hard to find a language that can't do this sort of
thing, even older Fortrans let you pass functions.
Jed
Yes, but that's something completely different! It's not like you're
able to do (using your notation):
set(&tmp &install)
set(&install &add_executable)
set(&add_executable &tmp)
In C/C++ and to various extent in Fortran (depending on the version)
you can pass around "function pointers". This is _not_ a function.
There's no way of doing that in C/C++ or Fortran (that is, without
using ugly preprocessor magic).
Michael
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake