>From: "Rich, Dave" <Dave_Rich@mentor.com> > 3. We need to clarify what a matching prototype for virtual method > is. This is an erratum. I am proposing that types must match, but formal > identifiers and defaults do not need to match. Agreed. This is very unclear. However, I think the matching needs to be closer than you have proposed. The formal identifiers need to match. It wouldn't matter if we only had the positional syntax for passing arguments. But SystemVerilog allows passing arguments by named connection. That becomes a problem if different overriding methods have different formal names. What would you do if the actual method called did not have one of the named arguments, or used the same name in a different position? Clearly you don't want to be checking argument names at runtime, to produce errors or decide which formal to pass each actual to. You could resolve the names to an argument position based on the type of the handle at compile time, and then use that position to pass to the corresponding (possible different named) argument in the actual method called. But this is potentially confusing. The proper solution is to require the formal names to match. Default values should match also. This allows compilers to resolve the default values at compile time for efficiency, if desired. It also avoids possible confusion about what default value is being used. Steven Sharp sharp@cadence.comReceived on Fri Jan 20 15:40:29 2006
This archive was generated by hypermail 2.1.8 : Fri Jan 20 2006 - 15:41:47 PST