Boost logo

Boost-Build :

Subject: Re: [Boost-build] jam/python function calling
From: Vladimir Prus (ghost_at_[hidden])
Date: 2010-07-16 08:45:34


On Thursday 15 July 2010 13:15:23 Juraj Ivančić wrote:

> On 14.7.2010 21:06, Vladimir Prus wrote:
> > I am starting to think that using exact signature from jam code is the
> > best approach here. Using magic lists of integers that describe unpacking
> > appears to be unmaintainable (even though the description has to be
> > written only once, it better be readable)
>
> Exact signature needlessly duplicates parameter names. This hardly
> increases readability IMHO.

On the other hand, you can copy-paste signature from .jam file, and it
will work.

> How about this:
>
> @jam_signature( [ '..*', '*', '?', '?' ] )
> def flags(rule_or_module, variable_name, condition, values, unchecked,
> hack_hack):
>
> or
>
> @jam_signature( "..*:*:?:?" )
> def flags(rule_or_module, variable_name, condition, values, unchecked,
> hack_hack):

This is indeed more terse -- and somewhat easier to parse.

Thanks,

--
Vladimir Prus
http://vladimir_prus.blogspot.com
Boost.Build: http://boost.org/boost-build2

Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk