Michael Wild wrote: > Although this is OT, I have to say that this is not true. C++ is still > statically typed.
Yes, it is statically typed, but symbols can have different definitions in different scopes. Overloaded functions are actually different, but template instances are written into every object file they show up in. The linker chooses arbitrarily which to use (and multiple instances may be used in a single program). You can have multiply defined symbols in C but you are not supposed to and the linker tries to avoid it, it is by-design in C++ and you are just supposed to be careful that they are all equivalent. > Sure, but you're not _renaming_ a function. You're just assigning the > address of a function to a pointer which can then be used to invoke that > function. It is _always_ clear that Func is a pointer to a function and > not something else. That is a property of static typing, in a dynamically typed language like Python, there is no problem with x = 5 x = "five" x = numpy.min Furthermore, there need not be any distinction at the call site (some like to always call function pointers using (*Func)(args) to make this clear). > Anyways, I didn't want to get into a language-war, but rather voiced my > dislike for such dubious flexibility. CMake is very domain-specific > language used to create build systems, not a general-purpose language. > > BTW, in the OP's particular case I would prefer to patch the upstream > source without any voodoo. I don't know the specifics of this case, but certain language features are important to be able to write maintainable systems, even if those are "just" build scripts. Jed
signature.asc
Description: OpenPGP digital signature
_______________________________________________ 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
