Re: Garbage collection



Peter Morris wrote:
The whole point is that the objects don't have to do anything, they are simply destroyed when they are no longer referenced from some root point such as

A: A global variable
B: Something else that is ultimately referenced from a global variable.


Pete



Yes, I think that I understand this. But my point was to not _enforce_ the need of a GC for all programming elements. As you know very well, a GC has advantages and drawbacks, both technical and human ("no free beer" (TM) ), so, imho, there are sometimes situations in which a GC is recommended, but sometimes not. An on/off global switch per project is in fact rather a one-way road (tell me, what would you do if you have a project with GC enabled and you decide that for eg. speed reasons, avoiding sloppy code aso. you want to disable it? You will traverse the entire code to put .Free everywhere is needed?). That's why I tried to propose an approach to allow the developer to explicitly declare what's GCed or not by using both inclusion and exclusion filtering declarative approach. Imho, the GC situation now is something similar with 'var' declaration explicit in Pascal, implicit in VB. Imho, an 'option explicit' will be a nice thing.

just my 2c,

--

m. th.
.



Relevant Pages

  • Re: option explicit
    ... Explicit", it might be moments of debugging time instead of hours. ... And one more reason I like it is that when I declare an object explicitly: ... dim myWksThatShowsTheSummary as Worksheet ... I can type mywks and hit ctrl space bar to have the VBE autocomplete (or show me ...
    (microsoft.public.excel.misc)
  • Re: Must declared length of a character function be matched by any procedure declaring it? YES
    ... length that any routine that used the function had to declare it to be ... end function bigfunc ... The reason that the error is not detected is that there is no explicit ... a character function can return a string ...
    (comp.lang.fortran)
  • Re: Are these good features to use?
    ... as it's good to explicitly declare what I'm creating. ... You can't use "var" without losing human-readable type information in all scenarios and it's not even legal in other scenarios, so there will always be some variables that should or must be declared with an explicit type. ... With the auto-property, it's an easily recognized pattern and reading it you immediately know everything there is to know about the property. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: lang effort: type conversions
    ... inferencer for the lang I am implementing, I have started to consider some ... Yes I have came to the same idea of using a variant type with either ... explicit declaration or invisible syntatic sugar like you are in functions. ... will declare a mutable one. ...
    (comp.lang.misc)