Tuesday, November 23, 2010

Re: C++0x lambda syntax

Andrew Venikov wrote:

> in c++0x it will be possible to use lambda functions.
>
> So, for example, this:
>
> [](int n) { return n+ 1; }
>
> Will become valid c++.
>
> Unfortunately it breaks current C++ highlighting.
> After a line like the one above, all curly brackets will be highlighted by VIM as "unmatched", making reading the code really hard.
>
> Is there a quick way to fix that?

You can vote for the C++ standard to not add things like this to make
the language even more cryptic.

Well, perhaps that's not a quick way, but it will make programmers who
try to decipher C++ programs a lot more sane.

--
It might look like I'm doing nothing, but at the cellular level
I'm really quite busy.

/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments:

Post a Comment