Why C++ ?

For everything that's not in any way related to PureBasic. General chat etc...
Codemonger
Enthusiast
Enthusiast
Posts: 384
Joined: Sat May 24, 2003 8:02 pm
Location: Canada
Contact:

Why C++ ?

Post by Codemonger »

Ok, if you have a look at "D" programming language from digital mars, you could get a good read of some of the downfalls of C++ language. This guy has shown some of the flaws of the C++ language and doesn't defend it religiously.

Look at the docs of lcc-win on 'c' and it simplifies the language to a simple language easy to understand and use - the scope of the language is finite, it can actually be summed up in a document. OOP is useful, but the C++ syntax is so shotty that it's almost unuseful. I think C++ has created it's own monster. Recently I have played around with .net and it's truely amazing, well organized. Although i can't stand the JIT compiler or the idea of not being a standalone exe (besides crappy ngen), thats a shame.

Anyway i was just reading religious posts of C++ programmers shooting down basic etc ... and how they can bit shift this and polymorph that ... and inherit this ... but it seems they can't create readable code , or even comment their programs properly, apparently function names have to have stupid prefixes and dumb sufixes that no one can understand, just to try to look smart. Anytime i look at c++ code that i want to use, i see a pile of crap ... only rarely i have opened up a .cpp file to see something that is legible. Anyway i guess my beef is that the language has been over abused.

Next time i see a "C++ is the greatest language post" then i'm going to say ... "oh yeah, my machine code is awesome , i don't even have to comment it like c++, i can confuse everybody into thinking I'm smart, heres my code: "

Code: Select all

"101010100001100101001010001010101001010101
010010100101001010101010100101010101010101001010
101010101010010101010100010010010101010101010101
010101010100110101010000110010100101000101010100
101010101001010010100101010101010010101010101010
100101010101010101001010101010001001001010101010
101010101010101010011010101000011001010010100010
101010010101010100101001010010101010101001010101
010101010010101010101010100101010101000100100101
010101010101010101010101001" 
"Can your basic or c++ do that ? huh"

Anyway I'm just trying to kill some time
<br>"I deliver Justice, not Mercy"

    - Codemonger, 2004 A.D.
thefool
Always Here
Always Here
Posts: 5875
Joined: Sat Aug 30, 2003 5:58 pm
Location: Denmark

Post by thefool »

well i also dosent belive that c++ is the best language. So i try to learn PB, FASM and the WIN API. Why? Then you can get the most out of pb. I dont need to learn fasm and winapi and all that stuff (well a little of winapi is good to know), but maybe i will come to use it a bit later. i dont know. But i stick to PB. And since ASM is the most powerfull language, and PB can use that directly in the PB code, PB is also one of the most powerfull languages :)

anyway, have you tried this code? Its awesome!! :

Code: Select all

0101010101010111101010101010
0101011100000011100101011011
0010101111110000010101011101
0010101010101010101101001010
Moonshine
Enthusiast
Enthusiast
Posts: 263
Joined: Tue May 25, 2004 12:13 am
Location: UK

Post by Moonshine »

I think PB should be recognised s one of the so-called "big boy" languages - its clean, efficient, and open (that is it isnt a specialist language such as the "games only" blitz/darkbasic) but it probably wont because of the one man team and the fact that it has limited OO support. But still its prbably the best basic you can get in my opinion.
Mark my words, when you least expect it, your uppance will come...
deadmoap
User
User
Posts: 79
Joined: Sun Feb 22, 2004 11:45 pm
Location: Riverdale, Utah
Contact:

Post by deadmoap »

I dislike C++, as well. It's mostly the syntax that I hate. There are just so many ways to do the same thing but with different syntax. And everyone programs differen't. When I look at a sample in C++, it's almost always very confusing because there are a lot of parts of the syntax that aren't explained anywhere.

Take cout for example:

cout << "y helo thar" << endl;

Well for one thing, it doesn't even look like a function. Infact, I don't even know what to call it. All I know is how to use it and what it does. I don't know why I have to use the "<<" or the "endl". And string manipulation is just as bad. You have to call a whole function just to add two string together or compair them.

File size is also a problem. So is compatibility. The same code is going to compile different with different flie sizes in any compiler.

I prefer assembly as the best programming language. It's very fast and very small. What it lacks in readability and efficiency, it more than makes up for in power, speed, and size.
NewMan
User
User
Posts: 11
Joined: Sun Jul 25, 2004 9:54 am

binary..

Post by NewMan »

guyz i have gud knowledge of asm,api,c++,pascal can u guyz tell me where did u learn machine code(binary) from? and does it have a compiler? thanks.
Kale
PureBasic Expert
PureBasic Expert
Posts: 3000
Joined: Fri Apr 25, 2003 6:03 pm
Location: Lincoln, UK
Contact:

Re: binary..

Post by Kale »

NewMan wrote:guyz i have gud knowledge of asm,api,c++,pascal can u guyz tell me where did u learn machine code(binary) from? and does it have a compiler? thanks.
8O Oh Dear!
--Kale

Image
thefool
Always Here
Always Here
Posts: 5875
Joined: Sat Aug 30, 2003 5:58 pm
Location: Denmark

Post by thefool »

No it dosent have a compiler.
Just copy this to notepad:

Code: Select all

010101101010101101010101110010101
01010101111100010101010101111110000000
01010101010110101011110001101001101101
save it to "word.exe" and you have a full blown word editor.
Cool eh?
Oh Dear!
@kale:
:roll: whatever.. :)

@NewMan: i hope you posted that question for fun.. else its pretty stupid..
Codemonger
Enthusiast
Enthusiast
Posts: 384
Joined: Sat May 24, 2003 8:02 pm
Location: Canada
Contact:

Post by Codemonger »

guyz i have gud knowledge of asm,api,c++,pascal can u guyz tell me where did u learn machine code(binary) from? and does it have a compiler? thanks.
I could post some bytecode that actually does something :lol: it'll look similar to the 1's and 0's ... All I'm trying to say is that I think C++ has become out of control, it relies too much on pre-processing which takes away from legibility when it gets abused, and it does get abused.

Microsoft would be a perfect example of that. There are good reasons they have done things like WINAPI or redefining variables and giving them alternate names ... its great for future compatibility as the relationship is one to many, basically you change WINAPI and you change everything using WINAPI. So yeah their are reasons for why the language is mangled but ... how many variants of an 'int' can you find in c++. So now it's become a guessing game as too what these are supposed to mean, instead of their original intention. ITS CRAZY !!
<br>"I deliver Justice, not Mercy"

    - Codemonger, 2004 A.D.
dmoc
Enthusiast
Enthusiast
Posts: 739
Joined: Sat Apr 26, 2003 12:40 am

Post by dmoc »

@Codemonger: I thing there is a mistake in your code: the 63rd bit should be a "1"
Codemonger
Enthusiast
Enthusiast
Posts: 384
Joined: Sat May 24, 2003 8:02 pm
Location: Canada
Contact:

Post by Codemonger »

Damn, thanks DMOC for pointing that out :lol: don't know how I could have missed that :oops:

I think I'll post some documentation in bit format talking about the bit mistake ... I don't believe in ASCII, it's way too 'BASIC' ... :wink:
<br>"I deliver Justice, not Mercy"

    - Codemonger, 2004 A.D.
kake26
Enthusiast
Enthusiast
Posts: 157
Joined: Sun Jan 25, 2004 7:21 pm
Contact:

Post by kake26 »

C/C++ is a pain yes I hate both of them. Alot of you mentioned the reasons why. I'd like to tack on a reason to that list.
Whatever you can do in C/C++ I can do in Free Pascal/Pascal/Delphi and do it alot faster.
Thats a solid and proven belief. Oh and this ASM thing come on people, ASM is old, can't ever read a asm app or figure out what the hell was written besides with computers getting better you don't need to code in ASM anymore. Unless your some kind of right wing nut job. I will never code in ASM ever cause I have FPC. One last item, itf its made by M$ it sucks by default. Oh, I shouldn't down play M$ like that, after all its their CRAPPY SOFTWARE that keeps me in business. I make house calls to fix peoples PC and that alone yeilds a rather good amount of money.
Last edited by kake26 on Sun Jul 25, 2004 9:27 pm, edited 1 time in total.
kake26
Enthusiast
Enthusiast
Posts: 157
Joined: Sun Jan 25, 2004 7:21 pm
Contact:

Post by kake26 »

Oh, I shouldn't down play M$ like that, after all its their CRAPPY SOFTWARE that keeps me in business. I make house calls to fix peoples PC and that alone yeilds a rather good amount of money.
kake26
Enthusiast
Enthusiast
Posts: 157
Joined: Sun Jan 25, 2004 7:21 pm
Contact:

Post by kake26 »

Oh and cause I can say it. You can solve all your computing problems by using Linux. I pitty any company that uses a Windows server cause they will without question spend alot of $$$ to fix and patch all the time.
kake26
Enthusiast
Enthusiast
Posts: 157
Joined: Sun Jan 25, 2004 7:21 pm
Contact:

Post by kake26 »

If any M$ loving monkey says I'm wrong I'm gonna go into rant mode and smack them around alot. I'm worked up cause I read this C++ sucks stuff and don't get me wrong C/C++ aren't worth my time.
thefool
Always Here
Always Here
Posts: 5875
Joined: Sat Aug 30, 2003 5:58 pm
Location: Denmark

Post by thefool »

you don't need to code in ASM anymore
if asm was not usefull anymore, pb would not be here. Or it wouldnt be as fast and make that small exe's. thats only because fred and other pb developers are so damn good asm programmers.
Post Reply