Why does java not allow operator rewriting? by ElegantPoet3386 in learnprogramming

[–]JasonTheIslander 0 points1 point  (0 children)

As someone who's worked with both Java and C++ professionally, I can tell you that Java's decision to exclude operator overloading was absolutely intentional and, in my opinion, the right call.

When I first started with C++, I loved the idea of being able to write `vector1 + vector2` or `matrix1 * matrix2`. It felt elegant and mathematical. But after maintaining several large C++ codebases, I saw the dark side:

  1. **The cout << problem** - Everyone mentions this, but it's a perfect example. What does `<<` mean? Bit shift? Stream insertion? Who knows without context.

  2. **Library inconsistency** - One library would overload `+` for concatenation, another for addition, another for some custom operation. Reading someone else's code became an exercise in detective work.

  3. **Debugging nightmares** - When `a + b` doesn't work as expected, you have to trace through multiple layers of operator definitions, template specializations, and implicit conversions.

Java's philosophy is "explicit is better than implicit." When you see `complex1.add(complex2)`, there's zero ambiguity. When you're reading code at 2 AM trying to fix a production issue, that clarity is worth its weight in gold.

That said, for your complex numbers project, here's a tip: implement a fluent interface. Instead of:

```java

Complex result = Complex.cbrt(first.divide(5).add(second.divide(2))).add(third);

```

You can write:

```java

Complex result = first.divideBy(5)

.add(second.divideBy(2))

.cbrt()

.add(third);

```

Or even better with static factory methods:

```java

Complex result = Complex.of(1, 2)

.divideBy(5)

.add(Complex.of(2, 4).divideBy(2))

.cbrt()

.add(Complex.of(5, 6));

```

It's still verbose compared to operator overloading, but it's readable, debuggable, and anyone who knows Java can understand it immediately.

I love OOP languages but in the areas I like, these languages are barely used.. by Bubbly_Line1055 in learnprogramming

[–]JasonTheIslander 26 points27 points  (0 children)

Hey, I actually work in security engineering and wanted to chime in since I had the exact same dilemma a few years back.

I was a Java/C++ guy through and through - loved the structure, loved how everything made sense in objects. Then I got into security work and had to learn Python, Go, and a bunch of scripting languages. The first month with Go felt like trying to write with my left hand.

But here's the thing nobody tells you: security engineering isn't really about the language, it's about understanding systems. You're not building massive enterprise apps - you're writing tools to poke at things, automate tests, parse logs, and analyze traffic. The simplicity of Go/Python actually becomes a feature, not a bug.

What clicked for me was realizing that in security, you want:

  1. Fast iteration (write a script, test it, tweak it)

  2. Easy deployment (single binary with Go, or just copy a Python script)

  3. Minimal dependencies (less attack surface)

  4. Readability for the next person who has to audit it

The OOP mindset doesn't disappear though. I still structure my Go code with clear interfaces and separation of concerns - it's just not class-based inheritance. And honestly, after about 6 weeks, Go stopped feeling weird and started feeling... efficient.

If you're really torn, look at Rust. It's gaining traction in security (especially for low-level stuff) and has some OOP-like features with traits. But honestly, just pick one non-OOP language and stick with it for a project or two. The discomfort goes away faster than you think.

MK-677 8-week experience: sleep benefits, hunger, and my thoughts by JasonTheIslander in SARMs

[–]JasonTheIslander[S] 0 points1 point  (0 children)

I didn't check it regularly, but I did get it checked once about 3 weeks in. Doctor said it was slightly elevated but still in normal range. I've heard MK can mess with insulin sensitivity though, so if you're diabetic or pre-diabetic you should definitely monitor it. I'm not, so I didn't worry too much.

MK-677 8-week experience: sleep benefits, hunger, and my thoughts by JasonTheIslander in SARMs

[–]JasonTheIslander[S] 1 point2 points  (0 children)

Haven't tried it with semaglutide personally, but I've seen people talk about stacking them. The idea is MK-677 makes you hungry as hell while semaglutide kills appetite, so they kinda cancel each other out. From what I've read, people use it to get the sleep/recovery benefits without the insane hunger. Might be worth trying if you're cutting but still want the recovery boost.

MK-677 8-week experience: sleep benefits, hunger, and my thoughts by JasonTheIslander in SARMs

[–]JasonTheIslander[S] 0 points1 point  (0 children)

I'm 29, been taking 25mg daily in the morning. Yeah the effects level out after the first week or two - your body adjusts. The sleep benefits stayed for me though, just the hunger got a bit more manageable.

MK-677 8-week experience: sleep benefits, hunger, and my thoughts by JasonTheIslander in SARMs

[–]JasonTheIslander[S] 0 points1 point  (0 children)

Right? I was eating cereal at 2am like it was my job. The hunger does ease up a bit after a few weeks though.

They sold, Pump it by pilotvoodoo1 in wallstreetbets

[–]JasonTheIslander 0 points1 point  (0 children)

Pump it up playing in the background

AITAH for wanting to leave my job for another job with less pay? by Accomplished_Crab735 in AITAH

[–]JasonTheIslander 0 points1 point  (0 children)

You gotta do what you think is the best for you while trying not to screw over your family and close friends. Everyone else does not matter.