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

Pages: 1-4041-

Virtual functions

Name: Anonymous 2008-11-06 20:23

What, pray tell, is the purpose of a virtual function? Also, why would you implement a "virtual" method? It just doesn't make sense.

Name: Anonymous 2008-11-06 20:48

to make it ENTERPRISE QUALITY

Name: Anonymous 2008-11-06 20:52

Ask Bjorke Shaftstrap.

Name: Anonymous 2008-11-06 21:34

>>1
Hey fucktard, the purpose of a virtual function is a placeholder for classes that derive from it.  Derived classes can implement the function in a way meaningful to the class.  That way you can have a method supported by multiple subclasses.  If you make the virtual function pure, then non-abstract subclasses HAVE to implement it.  Thanks.

Name: Anonymous 2008-11-06 21:35

OMG LOL

Name: Anonymous 2008-11-06 22:08

>>4
But, why do they call it "virtual"?

Name: Anonymous 2008-11-06 22:49

A virtual functions is also useful for the destructor.

If the base class's destructor is called before the derived objects destructor's have been called, then the derived objects will be destroyed as well.

That's why it is a good idea to declare the base class's destructor as virtual.

Name: Anonymous 2008-11-07 2:11

>>6
Because it means pretty much the same as "abstract", and probably appealed more to Stroustrop.

Name: Anonymous 2008-11-07 2:55

ONE WORD, DYNAMIC DISPATCH, THREAD OVER

Name: Anonymous 2008-11-07 3:35

>>9
Those are actually two words.

Name: Anonymous 2008-11-07 6:37

>>10
Actually, it's a DWORD.

Name: Anonymous 2008-11-07 9:52

Thanks guys. I think I understand virtual functions now. Now I will create some amazing programs in Sepples.

Name: Anonymous 2008-11-07 11:27

>>11
Posts like that are why I frequent /prog/.

Name: Anonymous 2008-11-07 11:29

>>12
FFFFFFFFFFFFFFFFFF

Name: Anonymous 2008-11-07 12:03

>>11
Actually, it's a dord.

Name: Anonymous 2008-11-07 12:05

What does
FFFFFFFFFFFFFFFFFF
mean?

Name: Anonymous 2008-11-07 12:29

>>16
4722366482869645213695

Name: Anonymous 2008-11-07 12:36

>>17
No, that is 0xFFFFFFFFFFFFFFFFFF.

Name: Anonymous 2008-11-07 13:48

It is named virtual because the faggots who came up with this shit wanted to come up with the vaugest keywords possible.

You faggots are too stupid to appreciate VB.Net. In VB.Net if an inherited class must override a given method, the method is declared as MustOverride in the base class. You know, because you don't have to virtual the method, you have to override it.

Name: Anonymous 2008-11-07 15:16

>>1
Read SICP Chapter 2

Name: Anonymous 2008-11-07 16:40

>>19
Somebody doesn't even know what the fuck a pure virtual function is...

Name: Anonymous 2008-11-07 16:48

>>21
Are you defending bjarne?

Name: Anonymous 2008-11-07 16:56

>>13
I thought I was the only one

Name: Anonymous 2008-11-07 17:55

One word, 11001011. Thread over.

Name: Anonymous 2008-11-07 18:09

>>24
You need to move to a better architecture.

Name: Anonymous 2008-11-07 21:38

>>21

That someone is you. The keyword for the class in VB.Net would be MustInherit, becuase you must inherit it. Calling it abstact is itself abstract and faggy.

Name: Anonymous 2008-11-07 22:18

>>26
Maybe instead of a keyword, they should make it a couple of paragraphs explaining what it does and when you should use it, with some short examples.
It's VB programmers, after all, so this may be the only way to force feed them some actual programming knowledge during their bouts of copypastaing broken code from forums and randomly mutating it until it runs.

Name: Anonymous 2008-11-07 23:43

>>27

See little faggot. You didn't know that VB.Net and VB are different languages. Same syntax, different languages. Like how C++ is C syntax. Or Javascript is C syntax. Javascript is not C though. But you seem to thing that all VB syntax languages are Visual Basic.

Yes, VB.Net does have:
If Then
End If

But faggy C syntax is still
if()
{
} //end if

And yes, if you are not a faggot and write a sufficiently complicated program, commenting your brackets is actually good coding.

Except in a decent IDE like Visual Studio all one has to type is "if" to get the rest. In C syntax who the fuck knows what the fuck they are going to do after typing if. It could be anything. So in the end, the verbose VB means less typing. Weird to everyone who is a faggot and doesn't understand shit.

Name: Anonymous 2008-11-07 23:55

>>28
Get out

Name: Anonymous 2008-11-08 1:33

>>28
Why is it that retarded programmers always put the opening bracket on a new line after the if()?

Name: Anonymous 2008-11-08 1:36

>>28
See Little Faggot. You Didn't Know That VB.Net And VB Are Different Languages. Same Syntax, Different Languages. Like How C++ Is C Syntax. Or Javascript Is C Syntax. Javascript Is Not C Though. But You Seem To Thing That All VB Syntax Languages Are Visual Basic.

Yes, VB.Net Does Have:
If Then
End If

But Faggy C Syntax Is Still
If()
{
} //End If

And Yes, If You Are Not A Faggot And Write A Sufficiently Complicated Program, Commenting Your Brackets Is Actually Good Coding.

Except In A Decent IDE Like Visual Studio All One Has To Type Is "If" To Get The Rest. In C Syntax Who The Fuck Knows What The Fuck They Are Going To Do After Typing If. It Could Be Anything. So In The End, The Verbose VB Means Less Typing. Weird To Everyone Who Is A Faggot And Doesn't Understand Shit.


fixed

Name: Anonymous 2008-11-08 3:18

>>28
And yes, if you are not a faggot and write a sufficiently complicated program, commenting your brackets is actually good coding.

Having so much levels of indentation that you actually have to comment your closing brackets means your code is broken and you need to fix it.

Name: Anonymous 2008-11-08 3:31

>>28
GET OUT. NEVER RETURN.

Name: Anonymous 2008-11-08 3:51

>>33
Hey now. There's nothing wrong with Visual Basic. It promotes good programming styles, such as the use of sequential style code and the use of If statements to test for conditions.

Name: Anonymous 2008-11-08 4:43

>>34
Hey Now. There's Nothing Wrong With Visual Basic. It Promotes Good Programming Styles, Such As The Use Of Sequential Style Code And The Use Of If Statements To Test For Conditions.

Name: Anonymous 2008-11-08 5:25

>>35
I See What You Did There. I Wonder If Anyone Else Can Get It???

Name: Anonymous 2008-11-08 17:41

>>19

dohohohohoho CamelHumpsKeyword

Name: Anonymous 2008-11-08 17:48

[b]Scheme[/u]

Name: Anonymous 2008-11-08 18:23

[s][o][b][i]BBCode[/o][/s][/i][/b]

Name: Anonymous 2008-11-08 23:43

>>30
Readability.

Name: Anonymous 2008-11-09 0:21

>>30
Looks prettier. Almost as nice as
[mm]void
foo ()
{[/mm]

This being C, we take our kicks where we can get them.

Name: Anonymous 2009-03-06 12:52


/amh.

Name: Anonymous 2011-02-04 11:31

Name: Anonymous 2011-02-17 19:46

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