Am I doing this right??? | |
AngleWyrm wrote:
> "John R. Strohm" <strohm@airmail.net> wrote in message news:bhp6ru$qg4@library2.airnews.net...
> > "AngleWyrm" <no_spam_anglewyrm@hotmail.com> wrote in message
> > news:BRF%a.37716$2x.3841@rwcrnsc52.ops.asp.att.net ...
> > > "Frithjof Engel" <frithjof@fms-engel.de> wrote in message
> > news:bhbeth$ung3c$1@news.hansenet.net...
> > This is the kind of ad-hoc hackery that I despise about C and C++.
> >
> > Here we have a procedure, that is declared as returning a value
> > (specifically, an int), and there is no "return" statement anywhere in
> > sight.
> >
> > This is, to a SANE language, a self-evident error on the programmer's part.
> >
> > My question: Is this a special case just for a procedure named "main", or is
> > this a special case for any procedure with a signature "int XXX(void)" or
> > "int XXX(unspecified)", or what?
>
> Yes, this is a special case, specifically for the program entry point called "main". It may be true
> that not explicitly declaring a return could be construed as confusing, and therefore possibly bad
> programming practice. It might also be acceptable to say that it is a default that is almost never
> used.
>
> C++ has the marks of evolution within it's existance. For instance, the wchar_t is a rather strange
> way to name a basic variable type; it seems like it would have been more orthagonal to name it
> wchar, and leave it at that.
I just try to ignore all this bizaare C++ crap and go on programming in C like I always have.
Template ... whats that??? etc..
Of course since Im from the old days, I know how to write my own library routines
from the bottom up (beside the programming I do wouldnt be helped much by all that generalized
wigetry anyway...) I do use things like DirectX, but manage to avoid most of the C++ OOP
gunk for the majority of the data crunching stuff (AI etc...) |