What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » Good programming language..

Good programming language..
Author: Message:
Verte
Full Member
***

Avatar

Posts: 272
Reputation: 7
Joined: Apr 2007
RE: RE: Good programming language..
quote:
Originally posted by ShawnZ
quote:
Originally posted by Verte
That's what they should do. But, if you use pointers anywhere, you've got to be very careful with GC. For example, if you pass a pointer variable to a subroutine, and the subroutine uses a temp variable to represent that variable inside, assigns a new object on the heap to the temp variable, and then the temp variable goes out of scope, most GCs will free the object. In cases such as these, you've got to increment the reference counter by hand, which is to say that you're essentially doing manual garbage collection anyway. This is because Garbage collection typically only tracks direct assignments, and where one variable may reference an object indirectly [such as through an array of pointers or references] the GC will not count the [second-order] reference.

IMO, you know when you're done with data, you deal with it.

thats why GC languages don't use pointers, they use references :p


A reference is treated much as a pointer internally. Compiled code only contains memory locations, not variable names. References are often more convenient, but they suffer the same problems with GC.

How about overlapping reference arrays, which are often the easiest and most sane way to hold data that needs to be viewed in two different ways? Again, the references aren't distinct but they aren't direct, so when the array they were created in [which was possibly intentionally temporary] passes out of scope, they disappear, and the big array you were holding them in now has a heap of invalid references that will segfault when you try to use them.
was put impeccably into words at DebianDay for me last Saturday, by Knut Yrvin of Trolltech - adults try something once, fail, and then are like "ffs this doesn't work". Children try, fail, and then try again, and succeed - maybe on the second, or even fifth retry. But the thing is that they keep at it and overcome the problems in the end.

-andrewdodd13
06-27-2007 10:17 AM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Good programming language.. - by Jhrono on 06-27-2007 at 12:03 AM
RE: Good programming language.. - by Knucks on 06-27-2007 at 12:11 AM
RE: Good programming language.. - by Jhrono on 06-27-2007 at 12:13 AM
RE: Good programming language.. - by TheSteve on 06-27-2007 at 12:17 AM
RE: Good programming language.. - by Jhrono on 06-27-2007 at 12:19 AM
RE: Good programming language.. - by albert on 06-27-2007 at 01:14 AM
RE: Good programming language.. - by Jhrono on 06-27-2007 at 01:22 AM
RE: Good programming language.. - by albert on 06-27-2007 at 01:34 AM
RE: RE: Good programming language.. - by Verte on 06-27-2007 at 08:59 AM
RE: Good programming language.. - by lopardo on 06-27-2007 at 02:38 AM
RE: Good programming language.. - by NanaFreak on 06-27-2007 at 03:28 AM
RE: Good programming language.. - by foaly on 06-27-2007 at 08:12 AM
RE: Good programming language.. - by ShawnZ on 06-27-2007 at 09:06 AM
RE: RE: Good programming language.. - by Verte on 06-27-2007 at 09:33 AM
RE: Good programming language.. - by ShawnZ on 06-27-2007 at 09:39 AM
RE: RE: Good programming language.. - by Verte on 06-27-2007 at 10:17 AM
RE: Good programming language.. - by Jarrod on 06-27-2007 at 09:41 AM
RE: RE: RE: Good programming language.. - by TheSteve on 06-27-2007 at 11:05 AM
RE: RE: RE: RE: Good programming language.. - by Verte on 06-27-2007 at 12:01 PM
RE: Good programming language.. - by Jhrono on 06-27-2007 at 03:08 PM
RE: Good programming language.. - by markee on 06-28-2007 at 09:59 AM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On