[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

should I get into c++ or java?

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 32
Thread images: 1

File: 16packabs.jpg (699KB, 1920x1200px) Image search: [Google]
16packabs.jpg
699KB, 1920x1200px
So I'm kinda looking for a general purpose programming language. I have some experience with Java and a lot with python and ruby (yes i know sjw etc etc) what I mean to say is I can program but I can't decide which language to look into.

What I like about Java
>good for android apps
>built-in garbage collection
>less autism in general
>single origin OOP inheritance

What I like about c++
>meant to be compiled
>faster
>broader applicability (?) except less suitable for android apps

Can some anons who are very familiar with java, c++ or preferably both help out? I'm mostly looking to learn it just out of general interest, maybe make some games for practice etc.
>>
>>59529612
>single origin OOP inheritance
This is not a good thing at all.

Plus you shouldn't use inheritance in most cases anyhow.
>>
>>59529612
>games
Sepples all day every day.
>>
>>59529635
I mean I don't intend on becoming a full-time game dev or something. I hardly play games, I just find it the most entertaining way to practice.

>>59529623
>Plus you shouldn't use inheritance in most cases anyhow.
why's that? is that just your personal opinion? I worked with ruby mostly so - >everything is an object - is something that's kind of deeply ingrained into the code I write and in a lot of cases inheritance seems to structure code nicely.

Why is multiple root inheritance preferable then?
>>
>>59529702
https://en.wikipedia.org/wiki/Composition_over_inheritance
>>
>>59529612

>>single origin OOP inheritance
>I want to be treated like a child while programming
>>
>>59529612
>c++ or java
>general purpose
no
c++ is deprecated and therefore only for maintanence of inherited codebase
java makes things more complex than they need to be for little, if any, profits.
>>
>>59529702
>is that just your personal opinion?
there's very little research when it comes to what are the best ways to program, so yes, everything in this realm can be treated as an opinion. you're not going to find undeniable facts here.
>>
>>59529978
so if c-- is deprecated (i half agree here) and java is too complex (seems difficult to prove) then what is the magical language you haven't mentioned
>>
>>59529978
>c++ is deprecated
anon pls
Sepples might have many pain points and runners up to replace it, but it's still the state of the art for many applications.
>>
>>59530351
He probably meant Rust.

But you got it wrong, Java isn't too complex, it makes things complex when they don't need to be. You have to write tons of boilerplate for things other languages do in a couple lines sometimes. That stems from a lack of complexity in the language rather than the opposite.
>>
>>59530401
>You have to write tons of boilerplate for things other languages do in a couple lines sometimes
OP here, this is one of the reasons I tend to like java more. It seems to build more on the things already implemented thousands of times rather than inventing the wheel all over again every time.

Actually I know nobody on /g/ likes ruby, but with ruby I actually feel like most of what I write has actual meaning and is actual code solving an actual problem, rather than trying to work my way around problems which already have been solved millions of times before.
>>
>>59530466
Believe me, you only have that impression because you haven't written tons of Java professionally.

The lack of real genericity has bitten me in the ass countless times, and the fact that Java devs rely on their IDEs so much should be a testament to the lack of expressivity of the language.
>>
>>59530510
You're right that I haven't written java professionally, and I did indeed rely on an IDE quite a bit. So is rust really a solution to all of this? I've literally never written a single line of rust code. is it fast? is it compiled? does it have oop at all?
>>
>>59530620
Rust is a fast (C++ comparable) compiled language but without classic class based OOP, it uses traits instead.

Although i wouldn't recommend it to a beginner, the learning curve is a bit harsh at the start.
>>
>>59530620
Rust does have a great templating system, compiler extensions and type aware macros, which are pretty much what you need to remove boilerplate without an IDE.

Not sure you would like it if you like Ruby, but you never know 'till you try.
>>
>>59530620
>>59530648
Do not forget that Rust is a total overkill for a one-man project anyway.
For now I suppose the only simple language that has a good library support is Go. If you are not afraid of lack of library support you can lurk moar, but I would be afraid.
>>
>>59530705
Yeah Go is pretty much what OP is looking for.
I still fucking hate how they force you to use their retarded folder structure. Is there a way out of $GOPATH or do I have to succumb to stupidity everytime I code in Golang?
>>
>>59530705
Go is yet another language I have zero experience with. Now what do you mean with "simple" and "good library support"? Java and c++ both have good library support, python is simple and has some decent libs (although it's also A LOT slower)
>>
>>59530734
>Now what do you mean with "simple"
Less constructs, so no OOP for example. But they went full retard and even removed enums.
>"good library support"
It's popular enough so that if you need a certain kind of library, it's propably in Go's ecosystem and it's propably working.
>>
>>59530776
if it has no OOP, or even no enums, is it somewhere between C and C++? it seems from benchmark it is around the same speed as C++ or Java
>>
>>59530815
Functionality-wise it's closer to C, but it has a GC so it's closer to Java performance-wise
>>
Only study C++ if you want to dig around in horse shit all day.

You'll be trying to maintain code in C++ that was created by someone who didn't really know it that well. At least with Java the garbage will be easier to understand and you can stop digging faster
>>
>>59531123
That goes for Java as well. Even moreso I'd say, since every retard can put out a running Java program, in sepples you have to at least try.
>>
>>59531170
>every retard can put out a running Java program, in sepples you have to at least try.
I've heard this argument multiple times but I refuse to believe it. Just because you manage to slither your way between memory overload and type errors doesn't mean your code is sound. You just literally passed the absolutely barely minimum requirements to even run it and you're already being smug and congratulating yourself.
>>
>>59531190
Hey doesn't mean it's good. Just saying our retards are of higher quality than the Java breed.

In C++ you'll be in the debugger, trying to understand what that C-with-classes-and-some-other-deprecated-feature-set-that-I-like is even doing to its data while in Java you'll be trying to make sense of byzantine hierarchies of classes that seem to serve no purpose at all but won't let the program run without them.

The real solution is to not work on code that was written by retards, but that's not an option ever.
>>
I'll shoot myself before using java again.
>>
>>59531242
>The real solution is to not work on code that was written by retards, but that's not an option ever.
seems not, especially on older languages

>>59531298
>I'll shoot myself before using java again
most old timers blame this on java just being old enough so that everyone has had at least some bad experience with them. It's always more fun to create a new codebase than it is to fix an old one, and with older languages the ratio of maintenance to production just increases.

The reason why everyone likes Ruby and especially Rails is that it's mostly being worked on by people who produce a code base in some basement start-up and then move on. In 5-10 years we'll get endless whining about unmaintable legacy rails codes with routing nobody can make sense of and classes that do nothing except break the project if you delete them.
>>
>>59531346
The bright side is that, whatever the language is, there are some good souls that write idiomatic code that is easy to maintain.

Granted, it's rare, but nothing beats the feeling of going through some legacy code and realizing that it's all well thought out for its use case and that your future work will be easy because you're working with the established codebase rather than against it.
>>
>>59529612
Avoid c++, go with Java. There'll be a library for anything you need, it's got arguably the best tooling if any modern language, a mountain of resources on any number of use cases or topics. And from the sound of it, you should be able to get going with it very quickly. Go and Rust are interesting alternatives, but Ruby experience is more readily transferable to Java than either of those two. After some time with Java I would definitely consider those two
>>
>>59531513
thanks for the info. I don't really feel too much for going with rust or go. From the little bit I read they don't seem to offer many advantages over either c++ or java. And I already have some experience with java.
>>
>>59531543
Then continue with Java. Once you've put Java through its paces, then you can search into languages of different paradigms and weigh them up, it's all about experimentation. Despite the hate it gets on this board, it's easy enough to understand/write if verbose, and a decent entry level OOP language. If anything you'll be able to see more clearly what your missing in other OO languages I've you have some solid Java experience rather than having to rely on subjective criticisms of java abd biased praise for other langs
Thread posts: 32
Thread images: 1


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.