Re: [sv-bc] Is an unnamed block with declarations a scope?

From: Michael McNamara <mcnamara_at_.....>
Date: Thu Aug 11 2005 - 20:58:41 PDT
Absolutely!

Let's us treat this language with some respect.  If we want protected variables, and we have already reserved the word "protected" and "local" please let us use one of these words to qualify a declaration rather than relying on the location of a declaration for "suprizing" behavior.

Pretend we needed to teach this language to new college graduates, for example.  Would we want protection to be based on location of declaration...?
-mac

 -----Original Message-----
From: 	Cliff Cummings [mailto:cliffc@sunburst-design.com]
Sent:	Thu Aug 11 20:37:51 2005
To:	sv-bc@eda.org
Subject:	Re: [sv-bc] Is an unnamed block with declarations a scope?

Hi, All -

No need to reply to my email address. I will continue to read the thread
on sv-bc@eda.org (one copy in my email inbox is enough).

I have no great attachment to declarations in unnamed blocks. I thought
they were there for those who did not want to name everything and who did
not expect to have hierarchical reference to the local variables.

If we decide to get rid of them, we should do so soon and get Stu and I to
quick-email our SV students to notify them of the pending change (I have
been showing the construct, noting the capability, but only on one slide
and with no great emphasis that anyone should do this).

As far as variable protection goes, could this be easily addressed by
using the same "local" and "protected" keywords that are used in class
data declarations for the same purpose?

Isn't module nesting also used to eliminate a hierarchical path to local
variables? (I'm not crazy about module nesting either). Seems like the
only good reason for module nesting is to put a visible wrapper around a
module that one intends to encrpyt. Any other good uses for nested
modules?

Regards - Cliff
Received on Thu Aug 11 20:58:50 2005

This archive was generated by hypermail 2.1.8 : Thu Aug 11 2005 - 20:59:03 PDT