Subject: Re: [sv-ec] Email vote on var usage
From: Kevin Cameron x3251 (Kevin.Cameron@nsc.com)
Date: Mon Feb 03 2003 - 17:42:05 PST
> From: "David W. Smith" <david.smith@synopsys.com>
>
> Please respond to the following options for use in pass by reference.
>
___yes _X_no var
___yes _X_no ref (substitute use of var with ref)
_X_yes ___no & (substitute use of var with & and move the use to just
> before the argument name - instead of before the type)
>
> Pick one. If no item has a majority then the two highest items will be voted
> on at Monday's meeting.
>
> Elligible voting members are:
>
> Arturo, Brad, Cliff, Dennis, Francoise, Jay, Karen, Kevin, Mehdi, Neil,
> Stefen, and Stu
Notes:
'&' introduces no new keywords, and is familiar to C++ users. It also ups the
likelihood that a C/C++ prototype will be reusable in SV when interfacing to
C/C++.
'&' is used in C++ to declare a reference, which is NOT a pointer, it's just
an alias, its use in C++ is limited because it cannot be reassigned i.e. it
is only assigned once in the declaration. As with C++ this use in SV does not
conflict with other uses of '&'.
If 'var' (or 'ref') is used to declare references for other uses it has an
awkard syntax, you have to say:
type_x a[5],b;
var type_x c;
Rather than:
type_x a[5],b,&c;
Which is a lot less typing and less error prone since the type is only specified
once. So I recommend not using "var" (or "ref") anywhere in SV.
Kev.
> The vote will close Friday (5:00 pm pacific)
>
> Regards
> David
> David W. Smith
> Synopsys Scientist
>
> Synopsys, Inc.
> Synopsys Technology Park
> 2025 NW Cornelius Pass Road
> Hillsboro, OR 97124
>
> Voice: 503.547.6467
> Main: 503.547.6000
> FAX: 503.547.6906
> Email: david.smith@synopsys.com
> <http://www.synopsys.com/> http://www.synopsys.com
>
>
This archive was generated by hypermail 2b28 : Mon Feb 03 2003 - 17:42:45 PST