On 04/10/2010 02:31 AM, Juha Heinanen wrote:
since M4 has been already invented perhaps it would be better to use that for the above rather than use scarce developer resources to reinvent the wheel.
In principle, I agree.
However, this very same argument could be made against features like 'include_file' and #!ifdef & friends, and some other things that have made Kamailio 3.x much better than 1.x from a code management perspective. These features have revolutionised our deployment, standardisation and maintenance process.
It is true that with enough spiritual commitment, we could have achieved them before by using m4. It would have allowed us to split elements of configuration across many files, perform global substitutions, etc. And yet, it was just too hard to get the initiative to learn it and do it, especially since it appeared that this approach would have been obsoleted by new Kamailio 3.x features anyway.
My point is that those features served to simplify and somewhat democratise the process of better code organisation, dynamism and maintenance, even though there were other ways to achieve the same objectives.