C++, I love you.

Pages: 1234
The minute I compiled my first C++ program, I new for sure this language was the one for me. I've tried all different types of languages, PHP, Visual Basic, C. But when I met C++, it gave me an inner feeling that no other language has ever gave me before. The feeling was excitement, euphoria, a sense of "this is where I belong". C++, I love you.
1
2
3
4
5
6
#include <iostream>

int main()
{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{
return*static_cast<bool*>(static_cast<void*>(std::endl(operator<<(std::cout, "I love you too!"))));
}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}


Edit: v2.
Last edited on
closed account (10oTURfi)
I dont get it. So this catfish2 guy is supposed to be the one who keeps hatin' on C++?
That is nice, but sounds utterly weird as C is the subset of C++, php uses the same structures as C++ (so does a lot of languages...if, do, while, for)...VB ..well VB is MS and I don't use much MS stuff. Knowing C++ makes it easy to learn others easily though. Congratulations on your love for C++ though. Have you tried Python, Lua, C#, Java, Lisp, Haskell?
Last edited on by closed account z6A9GNh0
closed account (j2NvC542)
I have seen Java sometimes and I think it's.. ugly. And a simple Hello World seems complicated. Why do I need a class for everything? Instead of simply outputting "Hello World", I have to create a class for this simple task. I don't like it.
With C++ I have a feeling of power and freedom, kind of. Not being forced to OOP.

The feeling was excitement, euphoria, a sense of "this is where I belong".

I had such a feeling in 10th grade, when I was first contacted with programming and interpreted my first Hello World program in QBASIC. It was amazing. I also learned HTML/CSS and PHP a lot, but I knew I couldn't be a webdesigner, because I wanted to actually be in control of a computer and this is what C++ makes possible.
Last edited on
hopefully assembly will give this same sense as C++ does :)
closed account (j2NvC542)
I will learn assembly for sure and it's going to be great :)

P.S.: College starts next month and I just can't wait! :D
Last edited on
^Yea i got Calc , COMP Architecture and Discrete Math this year and Im hoping that it all clicks and integrates with my software development skills. And op check this site out. I wish I found this site when I first started programming. http://chortle.ccsu.edu/AssemblyTutorial/index.html
closed account (j2NvC542)
Definitely learning from this link, thank you!
I have seen Java sometimes and I think it's.. ugly. And a simple Hello World seems complicated. Why do I need a class for everything? Instead of simply outputting "Hello World", I have to create a class for this simple task. I don't like it.
With C++ I have a feeling of power and freedom, kind of. Not being forced to OOP.



C++ was designed with OOP in mind, but doesn't bind you to it strictly. I personally see that as a cause of detriment to the overall structure and evolution of it's design.

But anyways, if you're doing something as simple as hello world, maybe a general purpose run time language with a large standard set of libraries isn't the right choice? Java isn't exactly meant for small scale single platform applications.
C++ doesn't force you to use OOP, but almost everything you use in C++ is an object. Think about std::string, std::cout, std::cin, std::fstream, etc. C++ was well designed in the aspect of letting beginners use OOP before they even understood it. Java requires you to get an idea of objects before you can really jump into the language.
Honestly, I don't think you should be learning Java if you can't get a good idea of OOP whilst learning it. In my opinion you should be able to pick up the semantics pretty quickly by the time you're dealing with OOP.

Then again, Java isn't pure OOP anyways and you really don't have to have any idea of the object to use it. Just define one class, your main class, and put all functions inside of it. No other classes are defined on your end, and no dealing with objects and classes any more than you would in C++.
Java hater aka bool wrote:
I have seen Java sometimes and I think it's.. ugly. And a simple Hello World seems complicated. Why do I need a class for everything? Instead of simply outputting "Hello World", I have to create a class for this simple task. I don't like it.
C hater wrote:
I have seen C++ sometimes and I think it's.. ugly. And a simple Hello World seems complicated. Why do I need a function for everything? Instead of simply outputting "Hello World", I have to create a function for this simple task. I don't like it.
PHP hater wrote:
I have seen PHP sometimes and I think it's.. ugly. And a simple Hello World seems complicated. Why do I need a .php file for everything? Instead of simply outputting "Hello World", I have to create a .php file for this simple task. I don't like it.

PHP: It obviously doesn't make sense to write a hello world program in the first place.
C++: It obviously doesn't make sense to have a function just to output your IP address, and that be the whole program.
Java: It obviously doesn't make sense to have a class to convert inches to feet.

Don't like Java's main class? Just a side-effect of the design pattern.
Don't like C++'s main function? Just a side-effect of the design pattern.
Don't like PHP's lack of a main function? Just a side-effect of the design pattern.

What I mean is that you should not make the mistake I made and dislike a language's design simply because it doesn't fit what you're trying to do. Enjoy a language for the things you can do with it ;)
Thank you L B for stating what I lacked the grace to phrase :P
With C++ I have a feeling of power and freedom, kind of. Not being forced to OOP


This myth gets repeated by Java haters so often, that it's boring. :D Define everything as static and use static imports, what's the problem with it? Classes become namespaces then. Still nicer than C/C++ IMHO because of lack of redundant declarations in header files. :)
I like python better except that it's too slow.

Most of the kind of programming I'm interested in requires efficiency. For the people who say C++ is the wrong tool for every job now days; which language would you use for object oriented, or object based, programming, when speed matters?


which language would you use for object oriented, or object based, programming, when speed matters?


Java. It is used to create probably the fastest and most scalable NoSQL database system in the world: Cassandra [1, 2]

[1] http://techblog.netflix.com/2011/11/benchmarking-cassandra-scalability-on.html
[2] http://www.cubrid.org/blog/dev-platform/nosql-benchmarking/
I'd probably still go with C++ for something like a game engine.
^or anything low level because many c/c++ compilers support inline assembly which acceses the cpu on the fly. I know java but seems too clunky in design like a mcprogramming languages its designed for rad and portability not for people who want to know at the binary/byte level what there code is really doing. its used for servers and business apps in CIS
Last edited on

or anything low level because many c/c++ compilers support inline assembly which acceses the cpu on the fly


Oh, really? Cool. Guess what. Java can do this, too. Assembly, system calls, GPU programming. Even direct, off-heap memory access. :P


want to know at the binary/byte level what there code is really doing


You don't know that in C++, either, until you inspect the binary code output by the compiler. Guess what? I can do that in Java, too.


its used for servers and business app


It is used just for anything C++ is used for. It only makes different accents, though - it stresses more dependability, security, productivity and team-work than raw performance or memory consumption.
Last edited on
Pages: 1234