RE: [sv-bc] Mantis 1571: Add default values for macro arguments

From: Bresticker, Shalom <shalom.bresticker_at_.....>
Date: Mon Oct 23 2006 - 08:32:40 PDT
Steven,

> I am sympathetic to Dave's viewpoint. If someone is making such
complex
> use of macros that they need named connections to keep the arguments
> straight and default values for arguments, then they are probably
> abusing
> them.

[SB] I disagree. Named connections are used to make the code readable
and to avoid misordering the connections, just like they are on every
other construct: modules, interfaces, programs, tasks, functions,
sequences, properties, ...

Also, when you put a wrapper around a construct which has a lot of
arguments, you need to pass the arguments from the wrapper call to the
construct inside, except for those which are internally specified or
calculated within the wrapper.

Illogically, when you call the construct directly, you can pass the
arguments by name, but not when you call the construct indirectly via a
macro wrapper.

Macros are not the best answer to every problem, but they do have
special advantages, such as not creating additional hierarchy scopes.
They can be called anywhere. You don't have to type the arguments.

Shalom
Received on Mon Oct 23 08:33:57 2006

This archive was generated by hypermail 2.1.8 : Mon Oct 23 2006 - 08:34:05 PDT