[CMake] Re: CMake script vs. Lua
Rodolfo Schulz de Lima
rodolfo at rodsoft.org
Fri Dec 14 17:36:57 EST 2007
Brandon Van Every escreveu:
> I can't call set(var value) "ugly". I can call it slightly verbose,
> as opposed to var=value.
Ugliness is highly subjective. I'm handsome, by the way :)
> It is boring precisely because it is *not* error prone. It is a way
> of ensuring against errors. If you haven't got your if..else..endif
> conditionals matched up, your code dies. Usually with an error
> message... sometimes though, it seems to die silently when invoked by
> a shell. That could be handled better. But the principal of forcing
> conditional matching is a reasonable idea in a build system, I think.
When I say error-prone, I mean that, specially in long if clauses, I
have to copy/paste the condition along the way. If I decide to change
it, I have to remember to change all other occurrences. I think that
correctly indented code is the best tool one can have against mismatched
if/endif's. And IF (no pun intended) the if's body is long, a little
comment on its endif clause would suffice to indicate where it's from.
The language should not force me to do that. The worst case scenario is
an if with an one line body and a long condition! That's why all my
macros assume that CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS is true.
> I rarely use 'break' even in C code.
I did once, and had to use a variable to control whether I should
execute the loop's body or not. That's ugly, and this time not subjective.
> nearly everything. We're nowhere near that endgame, and with CMake's
> current infrastructure, we're at no risk of ever being in such a lofty
> place. So, I feel comfortable saying that CMake will remain Yet
> Another Scripting Language.
As this discussion evolves, I feel more and more that the time has
passed to make huge infrastructure changes without changing the syntax.
> Previously I asked if there's something CMake script can never do. I
> will say 1 such thing: it will *never* gain mindshare. CMake itself
> may gain plenty of mindshare as a build tool. But CMake script will
> never do so. It is incapable of that. It is not recognized by the
> computer industry as an important development language, and it never
> will be.
Well, that's a little bit harsh. Once upon a time Lisp was popular, with
all those parenthesis. I cannot assure that cmake WON'T gain mindshare
simply because the cmake solution as a whole is better than any other
build system that I know of. It'll only be in bad waters when another
contender appears, supporting all features we've being talking about.
But then, I might be wrong, Cmake could be so widespread that its
'kingdom' won't be shaken.
Regards,
rod
More information about the CMake
mailing list