Hey, g

Hey, g,
Second year of university is about to be started.
I learn programming; the first year I learnt the very basics of the computer science; now i have to choose if i want to learn Java or C++.
I prefer working on web as I am very interested in Tor, anonimity and cryptography in general rather than making games (I hate games)

should i choose java or cpp?

Haskell

It doesn't matter much, but I'll go ahead and recommend C++. It'll give you a better idea of how a computer works and make you develop less bad programming habits than Java would. Also you can do C++ dev as long as you just have a unix console where as Java is a pain without and IDE.

Tor specifically is written mostly in C. It would be most beneficial to you to learn C++ and the C network stack if you want to get started in "web"

My university offers only ones i mentioned above. If none of them fits me I will learn another language out of university. But, still, which one of that two will be close to me?

>I am very interested in Tor, anonimity and cryptography
you're in the wrong university, kiddo.

go to harvard

C++ is superior to java in every way.

There is more paradigms you can use (which makes it better for students as you need to learn all aspects.
They both have a large number of libraries, so you can use either for production.

C++ used to be really shitty, so it isn't that much used in cryptography.

Another user here. Are c++ libraries multiplatform?
If i make a program with libcurlpp on linux, can i compile it for osx and windows? Do all libraries support this?

most of them are.
It is obviously possible to make something that aren't.
I don't know about that library specifically.

With C++, you have to compile it for every system, and with java, you just need a virtual machine to run the application.

>Java is a pain without and IDE

This is really only true if you're writing something huge, and at that point C++ would likely become a pain without an IDE as well.

Writing java code in terminal only is perfectly doable, though requires a bit more familiarity with the language than C++ does if you've just started learning.

I'd rather take Java and learn C on the side for personal projects I'm interested in. More employable skill set that way I feel.

If you can really only do one at a time, C++.

If you're student you can get most of JetBrains shit for nothing every year, including Intellij Ultimate and CLion.

How often do you really need to write code with no IDE?

>How often do you really need to write code with no IDE?
I don't use an IDE.

C is the base of most useful languages, Java and C++ included. If you learn C, picking up those languages is already 80% done. Java has stringent stylistic requirements and you have to learn new libraries, while C++ is a C superset that has more features for OOP.

I would say learn C.

>pic
It should be the other way around, better yet it should be C -> C++ and Java would be jabba the hutt.

>I am very interested in Tor, anonimity and cryptography in general
you should be doing hard math and CS, not IT

understand that almost all modern day colleges are degree mills that sell you a paper to put on a CV and unless you can somehow get into MIT or another school that actually gives a fuck about research, you'll have to find your own way to integrate the science

>There is more paradigms you can use
It's a Turing complete language. You can do pretty much anything in either language.

>How often do you really need to write code with no IDE?
I've never found a real benefit of an IDE, apart from having to cope with Java and C#'s horrific build system. Autocomplete is helpful, but it's really fiddly in every IDE I've worked with.

If you learn C++ you can pick up Java in an afternoon, but the reverse isn't true.

Lol

Every damn thread.

at least it's better than lisp and perl

Don't bother with C/C++ if you don't understand some assembly (Its really fucking easy to learn spend 8 hours and understand what registers and the stack are are and some basic commands)

Once you understand what C/C++ is doing under the hood you wont make nearly as many mistakes.

Else just learn Java its worth more money if your only gonna get a basic education in programming.

- From a C developer on Android

Paradigms have nothing to do with Turing completeness. Any ALGORITHM can be implemented in any language, but certain paradigms make tasks easier to deal with. Everything compiles down to assembly anyway (which is obviously Turing complete), but that doesn't mean all languages are suitable for all tasks. Take your typical OOP application, and try to rewrite in a (still Turing complete) subset of C that doesn't have structs or pointers. It can still be done, but it's going to be a lot of extra work.

C++. Java is an absolute piece of trash.

As a tip, Intel has great manuals on it's CPUs. They used to be avaiilable in print for free, but I think now its only PDF. It's a good place to start... tons of useful information.