Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

C#

Name: Anonymous 2007-07-16 11:10 ID:EEzO5dcf

Ok, so I picked up Visual C# about 20 minutes ago, and it seems to be the ultimate in faggotry:
"You may already know about destructors if you have used C++. Because of the automatic garbage collection system in C#, it is not likely that you will ever have to implement a destructor unless your class uses unmanaged resources"
Even objectPascal wasn't this gay.

Name: Anonymous 2007-07-16 11:16 ID:a4IW55Uz

Yeah destructors in C# are pretty pointless.

Worse than pointless in fact because C++ programmers use destructors to tidy up things like open files and database connections. In C++ the destructor gets called as soon as the object goes out of scope. If they try to do this in C# they'll have open connections lying around until the garbage collector feels like doing its job.

Name: Anonymous 2007-07-16 11:25 ID:EEzO5dcf

Fuck objectpascal, it's ada with a c-style syntax.

Name: Anonymous 2007-07-16 12:32 ID:5ykQoRdD

RAII doesn't work in garbage collected languages.

Name: Anonymous 2007-07-16 12:50 ID:dZEKi/vO

>>4
o rly? gb2/clueless/

There's no fundamental reason why RAII can't be used with GC. I'd love to hear your reasons why you think this is so. If C# doesn't support it, that's C#'s fault.

Name: Anonymous 2007-07-16 13:01 ID:aQkzqUhP

>>2
conn.close();

Name: Anonymous 2007-07-16 13:03 ID:dZEKi/vO

>>6
More bug-prone and verbose. Bad.

Name: Anonymous 2007-07-16 14:01 ID:yUz0+9zB

Yeah destructors in C# are pretty pointless.

HAHAHAHwhat? You kidding, right? Who the fuck thought of that? See it properly implemented in Python:

text = file('lol').read()
#Open file lol, call read(), since the file isn't stored, it's immediately garbage collected. File's destructor closes the file.

class lol(object):
    def __init__(self, x):
        self.x = x
    def __del__(self):
        print 'Hi, I am a destructor. I work with the GC, but I also work when called by hand, so you can do whatever suits you.'
        print 'Destroying object', self.x

o = lol(1)
o = lol(2) #lol(1) is destroyed
del o #lol(2) is destroyed by hand

Name: Anonymous 2007-07-16 14:25 ID:0HXA0mPP

>>8
You really think GC in that code snippet works like GC in a heavy/huge application?

Name: Anonymous 2007-07-16 18:45 ID:2zA5dZwa

>>8
ITT we fail at understanding how GCs work

Name: Anonymous 2007-07-16 19:04 ID:4QEoxXtZ

>>8
one word, python is ugly.

Name: Anonymous 2007-07-16 19:37 ID:eZeZ20jU

>>8
I want to bash too!
btw, if you want a nice way to dispose resources, try (with-open-file ...)

Name: Anonymous 2007-07-16 19:37 ID:yUz0+9zB

>>9
Python's GC works really good, and doesn't have the ugly stuttering issues you can see in Java applications that may halt for many tenths of a second while the GC runs. And if it doesn't work as you want, there's even an alternative GC you can try. Or you can call del to remove references by hand (thus forcing the GC to collect something if it was lazy about it).

Name: Anonymous 2007-07-16 20:31 ID:eZeZ20jU

>>13
THE FORCED LACK OF GOOD FILE HANDLING, THREAD OVER

Name: Anonymous 2007-07-17 0:00 ID:mXkJJsHX

Man, comparing Python's GC with Java's is just... plain idiotic.

The Java language is an absolute POS, but the JVM is nearly beyond approach. You're a clueless fanboy.

Name: Anonymous 2007-07-17 8:33 ID:UJwXhdFG

the JVM is nearly beyond approach

lolwhat

Name: Anonymous 2007-07-17 8:58 ID:Ld2+mIx4

>>16
lolilliteracy

Name: Anonymous 2007-07-17 12:34 ID:WJdcfIqR

One the subject of GC,
Ruby gets much faster if you switch GC off.

Name: Anonymous 2010-12-17 1:20

Are you GAY?
Are you a NIGGER?
Are you a GAY NIGGER?

If you answered "Yes" to all of the above questions, then GNAA (GAY NIGGER ASSOCIATION OF AMERICA) might be exactly what you've been looking for!

Name: Anonymous 2011-01-31 19:55

<-- check em dubz

Name: Anonymous 2011-02-03 4:05

Don't change these.
Name: Email:
Entire Thread Thread List