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

Java vs. C++

Name: VIPPER 2012-02-01 11:05

Hello /prog/, professional shitposterTM here. One of my Cisco classes for the second 8-week session of this semester was canceled due to low enrollment, and there aren't any other open Cisco classes for me to take, so I was thinking that I'd take a programming class. However, due to my schedule, and the fact that not all classes are open anymore, my only options are either a class on Java or one on C++. Which one would you suggest that I take?

I know regular expression, can make some simple bash scripts, and I mainly work with Cisco IOS and GNU/Linux in my networking classes, so although I don't know a whole lot about programming, I'm not exactly tech-illiterate either.

inb4 read SICP
no classes which fit into my schedule teach Lisp, so that's not an option

Name: Anonymous 2012-02-01 11:08

C++ is horrid, learn C (read K&R).
Java is also horrid, but you can at least get a job as an ENTERPRISE programmer easily. Go with it.

Name: Anonymous 2012-02-01 11:09

GO TO A REAL SCHOOL, IT FAGGOT

Name: Anonymous 2012-02-01 12:02

lisp is shit

Name: VIPPER 2012-02-01 12:05

>>4
Not as shit as you.

Name: Anonymous 2012-02-01 12:07

>>5
fuck off, russian antisemite faggot

Name: VIPPER 2012-02-01 12:13

>>6
Excuse me?

Name: Anonymous 2012-02-01 12:18

Java
stopped reading there

Name: VIPPER 2012-02-01 12:19

>>4-7
/polecat kebabs/

Name: Anonymous 2012-02-01 12:27

>>9
both lisp and you are shit

>>11 nice doubles

Name: Anonymous 2012-02-01 12:34

>>10
Thanks bro

All posts in this thread sucks!
No exceptions

Name: Anonymous 2012-02-01 12:35

Java vs. C++
Shit vs. Crap

Name: Anonymous 2012-02-01 13:18

>>12
Lisp vs. non-Lisp
Shit vs Crap

Name: Anonymous 2012-02-01 13:57

>>2
C is possibly worse. C++ is more practical for the most part. Unless you were making little toy programs, the choice would be C++ over C for most people.

Name: Anonymous 2012-02-01 14:06

>>14
-100/10

Name: Anonymous 2012-02-01 14:41

Java vs. C++
GC vs RAII

GC is shit.
RAII is best.

Name: Anonymous 2012-02-01 15:21

>>16
RAII is best

no, Both are shit

Name: Anonymous 2012-02-01 15:23

Don't bother asking /prog/ for advice. Nobody here actually knows C++ or Java, and you should hence ignore unsubstantiated claims such as "Java is slow" or "C++ is shit". The best path is to research the pros and cons for yourself, but here's a basic summary.

C++ and Java are two very different beasts, but it really only comes down to one thing: are you planning on getting a job as a programmer, or is this just a side-interest?

If you want to get a job writing code for a living, take the Java course. Java is the de-facto language that most large companies use. This is because Java offers a lot in the way of productivity and 3rd party tools, which allows their programmers to write less error-prone code in less time.
    Also, Java runs on what is called a VM (Virtual Machine). This means that your program will be (theoretically) portable across all platforms that the underlying VM is written for.
    Java utilizes a built-in GC (Garbage Collector) to clean up for you so it doesn't have to be done manually. This frees you up to concentrate on what really matters, which is the logic and structure of the program. Java is an Object-Oriented language, meaning that you will spend most of your time defining and manipulating data structures called objects in various ways.
    Java's portability and safety come at a price; any given Java program will be slower than an equivalent C++ program (although optimizations to the VM and the increasing power of computers serve to make this more or less a non-issue).

If you're just interested in learning programming, I'd suggest C++. Its syntax was the base for Java syntax, so the two don't look radically different. C++ is the same as Java in that it is Object-Oriented, but you have the ability to mix different programming paradigms within a single program. This means that you are not restricted to just using Object-Oriented Programming, unlike Java, which is strictly OO. there are also some aspects of Object-Oriented Programming that it does differently.
    The main advantage of C++ is its speed, and its vastly more powerful templates (though this facet can often be a double-edged sword). C++ does not use a VM like Java, and it is not garbage collected. This means that C++ programs are not portable across different systems (although its source code generally is; the distinction isn't really important for a beginner), but it is faster than Java; often quite a bit faster.
    C++'s speed also comes at a price, however. It is not as safe as Java's sandboxed environment. C++ allows you to manipulate pointers, which are dangerous and can crash your program if not used correctly.

(Anecdotal: I also find that, on average, Java code is much easier to debug. The C++ compiler will often give you very cryptic errors that are hard to track down. This is in part because of Java having a simplified syntax compared to C++. Whether this is a bad or good thing, is up to you).

TL;DR: Java will get you a job. It's safer than C++, and your programs will be write once, run anywhere. It forces you to only use Object-Oriented Programming, and is also somewhat slower.

C++ is fast and is more powerful, in some cases. It can also be Object-Oriented, but doesn't force you to use OOP exclusively. It is also more dangerous, and has a slightly more complex syntax.

Name: VIPPER 2012-02-01 16:42

>>18
Thank you very much for your response. I really appreciate it. All the "hurrdurr x language is shit, use y" weren't really helpful.

Name: Anonymous 2012-02-01 16:48

>>18
That's the single dumbest thing I've read so far. Now please tell us what you do for a living.

Name: 18 2012-02-01 16:49

JAVA IS SHIT

C++ IS CRAZY

Name: Anonymous 2012-02-01 17:23

>>15
You're just mad because C++ is evidently more useful.

Name: Anonymous 2012-02-01 17:29

C++ MIGHT BE USEFUL BUT IS STILL CRAZY

C++ NEEDS TO BE REDONE FROM SCRATCH

Name: Anonymous 2012-02-01 17:31

>>18
It forces you to only use OOP

I've written procedural in Java before. No one stopped me from doing that.


Anyway OP should use Lisp

Name: Anonymous 2012-02-01 21:14

>>23
Already done
it's called D

Name: Anonymous 2012-02-01 21:21

>>24
Of course you can do some acrobatics to work around it, but the fact that there's any barrier to writing procedural code at all is telling, don't you think?

Name: Anonymous 2012-02-01 21:54

>>26
I SEE NO BARRIER SIR

Name: Anonymous 2012-02-01 21:59

>>27
Let's start with the fact that you can't define a freestanding function. It *has* to be wrapped in a class.

Name: Anonymous 2012-02-01 22:01

>>28
THINK OF CLASSES AS NAMESPACES, THERE HAS TO BE SOME DEFAULT NAMESPACE WITHIN THE DEFAULT PACKAGE THAT CONTAINS STATIC VOID MAIN(...) AND THE REST OF YOUR PROCEDURAL FUNCTIONS

Name: Anonymous 2012-02-01 22:04

>>29
WITHIN THE DEFAULT PACKAGE

IGNORE THAT PART, SORRY

Name: Anonymous 2012-07-18 10:53

google have come out with a new language called go recently that looks like a better Java

http://golang.org/

Name: Anonymous 2012-07-18 11:11

>>31
I was just about to mention that. Learn C and Go. They're both very simple languages.

Name: Anonymous 2012-07-18 11:13

Name: Anonymous 2012-07-18 13:39

Gonee-chan!

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List