[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology

Name
Options
Comment
Verification
4chan Pass users can bypass this verification. [Learn More] [Login]
File
  • Please read the Rules and FAQ before posting.
  • You may highlight syntax and preserve whitespace by using [code] tags.

08/21/20New boards added: /vrpg/, /vmg/, /vst/ and /vm/
05/04/17New trial board added: /bant/ - International/Random
10/04/16New board for 4chan Pass users: /vip/ - Very Important Posts
[Hide] [Show All]


[Advertise on 4chan]


>puts bread on the table
>makes inexperienced /g/ trannies seethe
>makes C shart shills seethe
Yeah I'm thinking it's the best language
>>
Minecraft loading screen cup.
>>
>>107738376
nobody forces you to use oracle, silly billy

there are plenty of other distributions like amazon correcto, temurin etc. OpenJDK is the spec and is Oracle independent.
>>
>>107738273
Slow language C# better
>>
File: IMG_7198.jpg (58 KB, 739x415)
58 KB
58 KB JPG
>>107738273
Durga Sir mister Nagoor Baby
Fresher batch
>>
>>107738273
>>puts bread on the table
Been there, done that. Having to use Java almost every day for 7 years helped me understand why so many /g/tards prefer being a NEET.
>>
>>107739283
You probably worked in some legacy shitware and with old java versions. Modern Java solves all these problems. And you can always switch to Kotlin if you want a more concise, more FP focused JVM alternative.
>>
>>107739302
Oh great, a coding standard that changes...
>>
C > C++ > C# > Jabba
I tried the object oriented meme. Never again. It really leads to spaghetti code meanwhile my C codebases, even large and complex ones, never turn to spaghetti.
>>
>>107739395
>my C codebases
>shit nobody cares about award
>never written software of value award
>still thinks java is OOP only award
>>
File: reactjeet.jpg (345 KB, 2048x1170)
345 KB
345 KB JPG
>>107739278
>saar java is jeet lang saar
>t. reactjeet
>>
File: 1754950228548952.png (32 KB, 780x783)
32 KB
32 KB PNG
>>107739395
>the language that has no generics is the best because primitive = manly and smart or whatever the eceleb streamers told me
will never be a woman award
>>
>>107739302
>kotlin
shill elsewhere jeetbrains tranny
>>
>>107739395
I want a generic function that only works with objects that implement a certain interface (totally reasonable). Do that in C++, I'll wait.
>>
>>107739421
why the hate? you realize that Kotlin is just more expressive Java with better FP support?
I was a hater too before I tried it.
>>
>>107738273
Java = Jeet
literally jeet the language
it will kill the IT industry in america and make jeet offshoring a thing
>>
>>107739435
If jeetbrains gave kotlin java syntax instead of whatever the nulang granny syntax it has today it would be even an upgrade from java
I agree coroutines and non-nullable types are great, but kotlin is just really quite jarring to look at
>>
File: unknown.png (181 KB, 1024x1024)
181 KB
181 KB PNG
>>107739442
>java is jeet, unlike webshitting which no jeet has ever partaken in saar
fuck off rapedeep
>>
>>107739422
>I want a generic function that only works with objects that implement a certain interface
all meaningless word salad gibberish to me
let's start with: what problem do you actually want to solve?
>>
File: IMG_5584.png (78 KB, 1200x1200)
78 KB
78 KB PNG
*does everything you need, with a smile*
>>
>>107739464
>larps as low level dev that knows C and C++
>doesn't understand the most basic use case for generics
kek
>>
File: satania_laugh.gif (344 KB, 500x491)
344 KB
344 KB GIF
>>107739422
using std::derived_from;

struct IExample {
virtual void doSomething() = 0;
};

template <typename T>
requires derived_from<T, IExample>
void exampleFn(const T& obj) {
obj.doSomething();
}

bitch
>>
>>107739477
>slow shitlang award
>filled with bootcampers too dumb to learn a real language award
>shit frameworks with shit dependnecy management award
>will never be a real programming language award
>>
>>107739481
i've written a 10k+ line project in use by over 1000 people in pure C (without even using the standard library) and have not needed to implement generics. It's low level code so that explains why.
Later on I implemented a generic List<T> and Stack<T> (basically the same thing) using preprocessor hacks just for experimentation but I haven't released any project that uses it yet.
You can do the same thing for Dictionary<K,V>, but I haven't done it.
Also you still haven't explained what real-life problem you're trying to solve. I find that people who babble about things like generics, interfaces, inheritance, polymorphism, duck typing and so on are just overcomplicating simple things for no fucking reason
>>
File: image.jpg (420 KB, 2048x1243)
420 KB
420 KB JPG
>>107739508
yeah youre a larper who asked chatgpt to describe a bunch of buzzwords of “low level development” to throw together in this post
no one who actually has the same level of experience as you claim to have is this technologically illiterate
>>
>>107739503
>C++niles couldn't do this until 2020
>>
>>107739530
>moving the goalposts
i accept your concession tranny
>>
>>107739529
>no one who actually has the same level of experience as you claim to have is this technologically illiterate
knowing buzzwords and stacking 10 abstractions on top of each other doesn't make you smart
by the way, the software that I wrote is being used on my computer every day and without it I wouldn't be able to read my emails
>>
>>107739464
You have a function that returns the derivative of any mathematical object you input.
>>
File: dicaprio-kek.jpg (12 KB, 300x277)
12 KB
12 KB JPG
>>107739302
>You probably worked in some legacy shitware and with old java versions. Modern Java solves all these problems
>all these problems
Quote "these problems" you're referring to. What "problems" were mentioned in my post? You're not thinking, just following some kind of rigid procedure, some kind of ritual. The words are coming out of you but you don't know what you're trying to express. Precisely the kind of "mind" I've come to associate with Java.
>>
>>107739544
not only that, it was still possible before c++20
using std::is_base_of_v;

template <typename T>
void exampleFn(const T& obj) {
static_assert(is_base_of_v<IExample, T>, "T must implement IExample");

obj.doSomething();
}
>>
>>107738273

I got into programming by making retarded mods in minecraft, this shit language was my first love
>>
>>107739569
See chud, I know perfectly well that this was possible. But if you take off your incel-tinted glasses you would see how atrocious the syntax is, especially in SFINAE. Not to mention, C++ doesn't have interfaces, so you have to use multiple inheritance which is also a recipe for disaster
>>
>>107739554
that is not even remotely difficult or hard to do in plain C and probably even easier in sepples
typedef enum {
SomeMathObjectKind,
OtherMathObjectKind,
} MATHEMATICAL_OBJECT_KIND;

typedef struct {
MATHEMATICAL_OBJECT_KIND Kind;
// put other common properties here

union {
SOME_MATHEMATICAL_OBJECT Some;
OTHER_MATHEMATICAL_OBJECT Other;
} As;
} MATHEMATICAL_OBJECT, *PMATHEMATICAL_OBJECT;

// Caller is responsible for freeing returned object, yada yada
PMATHEMATICAL_OBJECT GetDerivative(
IN PMATHEMATICAL_OBJECT Object)
{
PMATHEMATICAL_OBJECT Derivative;

switch (Object->Kind) {
case SomeMathObjectKind:
// do stuff
break;
case OtherMathObjectKind:
// do other stuff
break;
default:
ASSERT (FALSE);
}

return Derivative;
}
>>
>>107739302
Java developers are the actual problem, not the language. They decided to create such stupid fucking patterns that makes starting at a company that uses Java a fucking pain in the ass, because you have to go through so many layers of abstractions, so many factory patterns, so many mappers just to get a sense of what a single endpoint is supposed to do.
Modern Java solves some boilerplate issues, improves the thread implementation, but Java was never the real problem, it was the people that for job security decided to make the implementations needlessly complicated. The JVM is also a huge memory hog, which in a world of containers is a downside.
>>
>>107739600
Quit moving the goalposts. Type constraints are possible in C++ in syntax only marginally less elegant than Java. And no one in C++ likes SFINAE.
// Java
class Processor<T extends MyClass> {
void process(T value) {
value.doSomething();
}
}

// C++
template <typename T>
concept ExtendsMyClass = is_base_of_v<T, MyClass>;

template <ExtendsMyClass T>
class Processor {
void process(const T& value) {
value.doSomething();
}
};

Make no mistake, Java syntax is infinitely more elegant than C++. But what you are alleging is blatantly untrue.
>>
File: 5759552.jpg (1.52 MB, 4404x2976)
1.52 MB
1.52 MB JPG
I got taught Java in school and I loved it. Then I got a job doing Java. HO LY FUUCK. It's such a 3rd world language. It's abstraction layer after abstraction layer you have these classes that inherit from other classes that inherit from other classes and then the XML configuration and build system with gradel or maven is just a nightmare of build errors. Don't get me wrong C# is pretty fucking bad as a well when oyu have to work in it. But nothing beats how terrible working in Java is.



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

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.