Is the lcl_LocalFunction naming convention useful?

Miklos Vajna vmiklos at
Mon Oct 8 23:09:03 PDT 2012

On Tue, Oct 09, 2012 at 08:59:47AM +0300, Tor Lillqvist <tml at> wrote:
> Where did this lcl_ convention come from? The lcl_ prefix has no
> meaning to a compiler or linker. If the intent is to make such
> functions file-local, why not use the static keyword, or an anonymous
> namespace instead, so that they actually *are* local also to the
> tool-chain? (You can still keep the lcl_ prefix if you love it.)

I think the intention is that when such a function is called, the lcl_
prefix helps you to realize it's a local function, not a method in the
current class or one of its parents. (Of course there are example of
abuse even of this rule, e.g. in writerfilter there are methods having
an lcl_foo name. ;-) )

So I think it's useful: when I read code, it makes understanding a bit

More information about the LibreOffice mailing list