Archived

This topic is now archived and is closed to further replies.

BJARNE STROUSSUP IS EVIL!!!

This topic is 5749 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Bjarne Strousup (You know who im talking about...) is evil. I have nearlly gone crazy replacing :: and . and -> to thier rightful signs. Why couldn''t he just make -> and :: just .? I mean isntead of: foo::foo2() why cant we have foo.foo2()? and the freaking pointers and classes!!! foo->whatever ... WHY COULDNT IT JUST BE A SIMPLE .????

Share this post


Link to post
Share on other sites
well,

its not his fault really, since its just syntax..
he had to start from C language syntax, and just added
his own constructs.

anyway, even if he used other constructs, someone would
just complain again.

so whatever he used, just be patient and you will get used to it...

{ Stating the obvious never helped any situation !! }

Share this post


Link to post
Share on other sites
Having . and -> is useful, as it provides another overloadable operator (useful for, for instance, smart pointer classes). Plain . can''t be overloaded, because there would be no way of differentiating between "member access" and "overloaded operator.".

As for ::, I''m not sure why you would *want* it to be replaced with .. It''s different -- it''s not member access (like . and ->), it''s scope resolution. A different idea.


In any case -- you''d have to be pretty frigging stupid to have a problem with picking the right one. The question is, why are you having to replace them -- why did you do them wrong in the first place?

Share this post


Link to post
Share on other sites
andrew: why don''t you post a link to the programming language you designed... i''d like to see how wonderful it is, since you seem to complain about every other one in existence...

Share this post


Link to post
Share on other sites
very interesting... although i only read a bit, it looks like "c++ for people who don't want to learn c++"...
i will finish this tomorrow when i am at work and not spending my own time
why don't you just use that then, instead of complaining about c++?

[edited by - krez on March 17, 2002 9:57:07 PM]

Share this post


Link to post
Share on other sites
For the record, it''s not exactly Bjarne Strousup "fault" there are . & ->, those are carried over from C and a primary goal of C++ was backwards compatibility (which is important in the realm of computing).

I guess you could ''blame'' :: on him...

I think there''s not enough operators, I like have unique operators for each different idea; a couple are reused and some are missing.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
quote:
Original post by sQuid
First of all it''s Stroustrup.

Secondly he probably just assumed a base level of intelligence for programmers.




*cough* elitism *cough*

Share this post


Link to post
Share on other sites
quote:
Original post by Andrew Nguyen
Why couldn''t he just make -> and :: just .?



You will be happy to note that sun and microsoft have "fixed" this "problem" in java and C#, so go use one of those if C++ annoys you.

Share this post


Link to post
Share on other sites
It''s not "elitism." It''s not hard to use the three operators correctly. Unless you''re one of those people who misuse "there", "their", and "they''re."

I can understand why Java programmers might have to adjust to it (Java only uses periods) but it''s nothing complicated.

~CGameProgrammer( );

Share this post


Link to post
Share on other sites
quote:
Original post by Anonymous Poster
*cough* elitism *cough*

Considering how low that base level is, it''s hardly elitism.

If your entity is an object (class/struct/union), use operator.

If your entity is a pointer to an object, use operator->

If you''re often confused about whether your entity is an object or a pointer, and you have a sucky IDE, use descriptive variable names (obj, pObj).

If you''re still stuck, you really are stupid. A five year-old can grasp simple binary rules; why can''t you?

[ GDNet Start Here | GDNet Search Tool | GDNet FAQ | MS RTFM [MSDN] | SGI STL Docs | Google! ]
Thanks to Kylotan for the idea!

Share this post


Link to post
Share on other sites
Use Delphi if you want speed, simplicity and performance.
peh-java,c#---Why is it static: public static void main(String[] args)
Ahhh- What stupidity

Amresh
ramresh@dsqsoft.com

Share this post


Link to post
Share on other sites
Don''t like C++? Tired of having enough rope to hang yourself with? Try Ada95--the first OO language I learned. When I learned C++ after Ada95 it took me by surprise how often C++ let you shoot yourself in the foot with run-time errors and non-intuitive syntax. Aonix makes a good win32 Ada95 compiler: Object Ada95.

Share this post


Link to post
Share on other sites
Um - I hate Java and I can explain why main in Java needs to be static.

When the program starts - main is an entry point. Therefore main is called first. But in Java, main is a object method. At the point main is called, there are NO objects instantiated, so it is IMPOSSIBLE to call a member function. But static member functions can be called without an object... Thus - main must be static.

And that is why main is static...

Landsknecht

P.S. And it is public so the header code can call it...

[edited by - landsknecht on March 17, 2002 11:54:59 PM]

Share this post


Link to post
Share on other sites
I''ll give you one valid reason for having both -> and .
Say you''re making a smart pointer class. This smart pointer class could have to point to a struct, thus we want to overload operator->
You also want to have operator. for normal access to this class.

Share this post


Link to post
Share on other sites
quote:
Original post by Andrew Nguyen
Bjarne Strousup (You know who im talking about...) is evil. I have nearlly gone crazy replacing :: and . and -> to thier rightful signs. Why couldn''t he just make -> and :: just .? I mean isntead of:

foo::foo2()

why cant we have

foo.foo2()?

and the freaking pointers and classes!!!

foo->whatever

... WHY COULDNT IT JUST BE A SIMPLE .????


You again, I thought you were finished with asking idiotic questions and complaining for no reason...

I''ll tell you the same thing I said in another thread, if you don''t like the tools, why don''t you go back to Python which you seem to think is the answer to all programming needs???



"And that''s the bottom line cause I said so!"

Cyberdrek
cyberdrek@gdnmail.net
Founder Laval Linux

/(bb|[^b]{2})/ that is the Question -- ThinkGeek.com
Hash Bang Slash bin Slash Bash -- #!/bin/bash

Share this post


Link to post
Share on other sites
I think it''s better that way. Less ambiguity. I''ve been doing some C# lately, and (probably because I don''t know the standard lib too well) I''m often found reading someone''s sample code, only to find out that what I originally thought to be an instance method was actually a static class member.

Not sure if the difference between . and -> is as significant, but I think :: is the right way.

"Eagles may soar, but weasels don''t get sucked into jet engines."

Share this post


Link to post
Share on other sites
quote:
Original post by the Speed Bump
I''ve been doing some C# lately, and (probably because I don''t know the standard lib too well) I''m often found reading someone''s sample code, only to find out that what I originally thought to be an instance method was actually a static class member.


I dont really see that one - if you are following the recommended naming conventions it should look like this:

  
MyClass.MyStaticMethod( arg1, arg2 );

myInstanceObject.MyInstanceMethod( arg1, arg2 );


Share this post


Link to post
Share on other sites

This topic is 5749 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Guest
This topic is now closed to further replies.