[CMake] lexical scoping
Brandon Van Every
bvanevery at gmail.com
Fri Nov 2 18:09:01 EDT 2007
On Nov 2, 2007 5:57 PM, KSpam <keesling_spam at cox.net> wrote:
>
> variable_scope_begin(scratch_preamble got_match not_trail empty)
> # [...]
> # my actual code, blah blah blah
> # [...]
> variable_scope_end(scratch_preamble got_match not_trail empty)
That's better, but what happens when I change my variable names and
forget to update this stuff?
> Of course, if we could get braces into the mix, it would reduce to:
>
> variable_scope(scratch_preamble got_match not_trail empty)
> {
> # [...]
> # my actual code, blah blah blah
> # [...]
> }
Why is this better than implementing functions?
> I will trade typing a few more characters for variable safety any day.
You can do that now with verbose variable prefixes.
Cheers,
Brandon Van Every
More information about the CMake
mailing list