Re: Global Const vs Public Const




"Bob Butler" <tiredofit@xxxxxxxxxxx> wrote in message
news:%23GNRjSd1GHA.1256@xxxxxxxxxxxxxxxxxxxxxxx
"Stefan Berglund" <sorry.no.koolaid@xxxxxx> wrote in message
news:228bg2lmqhn9eon2k8um93c9nto53cjbqa@xxxxxxx
On Mon, 11 Sep 2006 17:28:48 +1000, "Michael C" <nospam@xxxxxxxxxx>
wrote:
in <#UZvINX1GHA.4796@xxxxxxxxxxxxxxxxxxxx>

"Bob Butler" <tiredofit@xxxxxxxxxxx> wrote in message
news:umj7bvT1GHA.4648@xxxxxxxxxxxxxxxxxxxxxxx
"Public" therefore has 2 different meanings depending on where it
is used so
it makes sense to use Global when that's what you mean and Public
only for the new meaning that Global doesn't already cover.

"new hotness" is not always better as we have so painfully seen

Normally I would say this is a bad idea but I guess if you're using
an eol language there's no point avoiding the eol keywords :-)

Michael


That's fairly humorous considering that the .NET languages/platform
may portend the EOL of the vendor itself.

At least as far as development tools go. The fact that MS is leading in a
given direction is no reason to follow. Deprecating Global in favor of
Public was a mistake IMO and after careful consideration I decided to
continue using Global where appropriate until I no longer had a choice in
the hope that it might get restored when cooler heads prevailed. Little
did
I know that they'd go ahead and discard the whole language in favor of
that
C# wanna-be.


The 'deprecating' actually made little sense, as you mentioned Public
demonstrates different behavior in Forms and Classes. Anything declared as
Public in these objects becomes part of the 'Public Interface'. There was no
reason to also change Global in bas modules to Public. If fact it would have
made the whole issue of scope a lot less confusing to beginners if they
wouldn't have allowed 'Public' in bas modules.

I seem to remember some MS apologist at the time saying they did that
because allowing 'Global' in bas modules in ActiveX Dlls was "confusing".
Yet it seems they would have only to publish a one line explanation -
"Global means global to the project".

Anyway, IMHO, it never did make any sense. And like Bob, little did I know
how much more sense was about to be thrown out the door.

-ralph


.



Relevant Pages

  • Re: Global Const vs Public Const
    ... leading in a given direction is no reason to follow. ... BAS modules and always meant 'global to the project'. ... part of the public interface of the creatable object ... no need to give Public this dual meaning since the Global keyword already ...
    (microsoft.public.vb.general.discussion)
  • Re: Global Const vs Public Const
    ... leading in a given direction is no reason to follow. ... syntax checker will not allow 'Global' to be declared in these items. ... BAS modules and always meant 'global to the project'. ... The meaning and use ...
    (microsoft.public.vb.general.discussion)
  • Re: Property Get/Let versus Global Variables
    ... Can anyone come up with a reason to use them in standard BAS modules? ... Anytime there is a need for additional action to be taken in addition to changing the value ...
    (microsoft.public.vb.general.discussion)
  • Re: EoL dates
    ... > Is there any reason why releases have EoL dates after only 12 ... They are supported by unpaid volunteers who have a limit to the amount ... Kris ...
    (FreeBSD-Security)
  • EoL dates
    ... Is there any reason why releases have EoL dates after only 12 ... While it's clear that some sort of EoL is important, ... of any security advisories recently which weren't accompanied by patches ...
    (FreeBSD-Security)