Re: various objects in my VB6 project - Calling IUnknown

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Mark G. Meyers (mmeyers[at]hydromilling.com)
Date: 06/30/04


Date: Wed, 30 Jun 2004 13:32:12 -0400


"Ken Halter" <Ken_Halter@Use_Sparingly_Hotmail.com> wrote in message
news:ucNSz5rXEHA.2944@TK2MSFTNGP11.phx.gbl...
> Mark G. Meyers wrote:
>
> Bottom line is you're working too hard. VB already takes care of most of
> the things you want to add.
>
> > BEGIN RANT...
> > I think VB doesn't offer garbage collection as much as it does garbage.
And
> > what is the difference between 'friend' and 'public' exactly? Nice lack
of
>
> As Peter said, Friend is the same as Public but only within the current
> project.
>
> > static class members! And thanks be to inheritence through
encapsulation.
> > How about that 'feature' where variables don't have to be declared - by
>
> Well.. you can always set the IDE option that places Option Explicit at
> the top of each new module.. I wouldn't leave home without it.
>
> > default. I would have thought that one to pass us by, say, 15 years ago
(or
> > maybe when I coded in Dartmouth S-BASIC 25 years ago, which did require
one
>
> Until .Net was release, it was important to support legacy code.
>

Hello. Regarding the above, didn't know about the IDE setting (thanks!) -
I'm just an amateur, but, really, is this setting not turned on because of
legacy support? Old EXEs don't break, right? And on that matter, what made
XP or .NET or whatever something that could break old things in the IDE, and
not this? Really, it's not like we're talking about a massive migration hit
for this example. Amidst it's sheer simplicity, I don't think this scales
well against developments in structured programming practices over the
years.

Frankly, I never coded a module without Option Explicit, but, I've had at
least one programmer do it because of forgetting or not really understanding
the need. I've seen another make the mistake of modifying the caller's
primitive (default ByRef). It kind of freaked him out. Frankly, I would
have guessed the basic types to default to ByVal, but I don't really care
much about it. I just as a matter of habit don't modify the caller's vars,
except with object refs, as they are coded to protect themselves. My only
exceptions are quite rare, and well documented as to their
passing-pointers-like behavior where they happen.

> > to do so). Boy, do I have a pet peeve or two with this language. In
this
> > case, we got New, and we got no Delete. Ever see your COM subsystem
just
>
> Nothing is all you'll ever need to "Delete" an object. If it doesn't go
> away, there's unresolved problems within (like circular references)
>

Right! Unresolved problems within - that's the crux of it.

-Mark



Relevant Pages

  • Re: Why I have error message "not have an entry point defined"?
    ... The IDE generate what you need. ... and "take care of them" for you. ... > The window form client and service are developed by Visual Studio .NET. ... >> ..Net Developer ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Test cases and static typing
    ... >>As long as I am writing only tests, I don't care. ... >>of writing tests, I want to write as many tests as possible, without ... > And anyway, this would be a question of the IDE, not of static typing. ... OTOH, Lisp certainly doesn't check ...
    (comp.lang.python)
  • Re: Test cases and static typing
    ... >>As long as I am writing only tests, I don't care. ... >>of writing tests, I want to write as many tests as possible, without ... > And anyway, this would be a question of the IDE, not of static typing. ... OTOH, Lisp certainly doesn't check ...
    (comp.lang.lisp)
  • Re: Delphi for Win64 / AMD64?
    ... Don't care whether the IDE is running in 32 or 64bit. ... API hooking, DLL injection ...
    (borland.public.delphi.non-technical)
  • Re: How do I . . .
    ... > Thank you for the correction! ... That'll cause the IDE always to insert Option Explicit when you add a new ... Steve Rindsberg, PPT MVP ...
    (microsoft.public.word.vba.beginners)