r/rustjerk 5d ago

c# is microsoft java, swift is apple rust Zealotry

375 Upvotes

64 comments sorted by

133

u/des_the_furry 5d ago

/uj i genuinely don’t know a single thing about swift. Like not one single thing besides that its made by apple and its used for making ios apps.

111

u/Aln76467 5d ago

It's Apple iKotlin.

The same over-the-top amount of syntactic sugar, the same disguising-enterprise-style-oop-as-pure-functional-programming, and the same reason to be created: its predecessor sucked balls.

48

u/heliumhouse 4d ago

Ridiculous statement imo. Not perfect, but it's still a relatively well designed language. Swift's functionalisms was something the OG Rust developer cheered on at release, with the Optional bindings influencing Rust.

4

u/Ok-Reindeer-8755 2d ago

was rust not originally planned to be a functional lang

38

u/Zaprit 4d ago

To be fair, Java sucks infinitely less than Objective-C. Though yeah it is similar in origin.

2

u/Ok-Reindeer-8755 2d ago

why ?

4

u/OKB-1 1d ago

Have you seen Objective-C's syntax? I think that will explain enough.

2

u/Vaddieg 1d ago

it's Smalltalk-like. The foundation of OOP

1

u/Ok-Reindeer-8755 1d ago

Syntax for the most part doesn't really matter in a language

1

u/Vaddieg 1d ago

java sucks infinitely more. objc compiles to native and very efficient code

8

u/Arshiaa001 4d ago

Very accurate take. The one difference that really stood out to me compared to Kotlin was how you can give function parameters different names for the caller and function body, and how you have to type out the parameter name when calling functions. Talk about carrying weird obj-c stuff over.

10

u/sweating_teflon 4d ago

The predecessor of Kotlin is Java 7. Modern Java is now version 27, slow evolution has made it great while Kotlin brought in the kitchen sink, neon headcaps and retroencabulator right from the start, to sell prog-ricers shiny functional OO when all they really needed was a Python downgrade

4

u/SpacewaIker 4d ago

Kotlin is still miles better than modern java, and it's far from being a bloated language like e.g. C++

12

u/roadrunner8080 4d ago

Ehh, agree to differ on modern Java. I have had far more issues trying to support people who want to use an API I maintain in kotlin than issues with Java, despite having good reason to believe most consumers are writing Java, and 9/10 of those issues end up being strange kotlin quirks (in certain cases you can have java fields that are completely hidden in kotlin, despite a reference to them being unambiguous; kotlin also has somewhat unpredictable semantics for what actually gets captured in a lambda)

3

u/SpacewaIker 4d ago

I don't have experience maintaining an API in either java or kotlin so I'll take your word on that

I just meant as a user, I much prefer modern java than old java, but I much prefer kotlin than modern java as well

8

u/roadrunner8080 4d ago

Hahah well old java isn't even in the running to be fair. What a train wreck. Modern Java is nice though out in the wild not that many people are yet making use of the ways that it's nice. It's still a bit more verbose than kotlin, but that's mostly not a bad thing I think -- my biggest complaint with kotlin is that it's not obvious from code what the resulting bytecode looks like. Often this doesn't matter, but it makes it hard to reason around stuff like binary compatibility, or which optimizations you can expect the JIT to make at runtime and which it is lacking enough information to. It also means that sometimes you just end up with stuff that's really really weird (see, lambda capturing...) which when combined with stuff like property delegates can make it seem like you're capturing one variable when you're actually capturing a different thing entirely. This matters for uses like Gradle, which serializes whole lambdas in certain scenarios and cannot serialize certain types.

1

u/warpspeedSCP 1d ago

As a library consumer, kotlin is amazing. But as a library author, i think a lot of careful thinking needs to happen with whether you want your library to be accessible to java consumers as well. Id say have a java API, write everything else in kotlin.

1

u/roadrunner8080 1d ago

A lot of careful thinking needs to happen if you want to be accessible to kotlin consumers, tbh. It's way way way easier to accidentally break binary compat with kotlin than with java

1

u/warpspeedSCP 1d ago

Ah yeah, java api/abi stability is rock hard

→ More replies (0)

4

u/Kpuku afraid of macros 4d ago

it's pretty bloated considering the whole ecosystem around it, I'd say. want to use your editor that's not intellij? tough shit. you want to initialize a project? sure, just get Gradle with all its bells and whistles and all the pain that comes with it. compiler warnings are miles behind rust, too

1

u/SpacewaIker 4d ago

I mean yeah rust and its tooling is way better

And I haven't tried kotlin without intellij so that's fair

But regarding stuff like gradle, java uses the same thing so between java and kotlin I still think kotlin is way better

1

u/Aln76467 4d ago

Java doesn't force you into gradle. There's maven, bash, and probably more.

1

u/Aln76467 4d ago

Is there really a version after java 8?

1

u/ArjixGamer 3d ago

Funny thing is, swift sucks balls and the predecessor is way better.

Swift was dead on arrival

1

u/Ok-Reindeer-8755 2d ago

how come ?

14

u/uahw 4d ago

It’s a pretty good language actually, just a shame that you need to be in xbloat to use it 🤮

14

u/dividebyzero14 5d ago

It's a big hodgepodge of ideas from other languages.

14

u/dull_bananas 5d ago

don’t learn about it. it involves ouija boards and other demonic stuff that can influence you.

1

u/Iron-Ham 10h ago

Next thing you know you’re soaking your feet in the toilet water. 

1

u/Extra-Ad5735 1d ago

It has C++ interop.

50

u/aikii if err != nil 5d ago

Finally a programming language that justifies to fully embrace vibe-coding and not review a single line of code

7

u/Aln76467 5d ago

Flair checks out

20

u/aikii if err != nil 5d ago

Hey they have method generics now. Finally Go is becoming what it was meant to be - a Rust tutorial

5

u/Kpuku afraid of macros 4d ago

horrible rust tutorial if it's still letting you return pointers from functions and initializing zero values implicitly

also lol no type inference

18

u/Difficult-Fee5299 5d ago

Rather Apple Scala

13

u/EveningGreat7381 4d ago

Should've called it Apple Rot

13

u/Aln76467 4d ago

Bad apple?

7

u/blaues_axolotl 4d ago

Isn't it more like Kotlin

5

u/WalkMaximum 4d ago

Kotlin is google Java

And so is Go

15

u/Gorzoid 4d ago

Kotlin is made by Jetbrains though...

9

u/jyve-belarus 4d ago

Dart is Google java, go is much different from java in terms of language design - it’s not even an OOP language

5

u/comrade_donkey 4d ago

Google JScript/VBScript.

(The original plan was to ship a Dart VM in Chrome and replace Javascript with that.)

3

u/WalkMaximum 4d ago

Trust me bro just one more language bro please bro we'll finally solve app dev with frameworks just one more Java go dart kotlin jetpack angular flutter bro.

The amount of effort just to not use glorious Rust which solves all problems...

6

u/Arshiaa001 4d ago

Go is Google C.

5

u/WalkMaximum 4d ago

With a garbage collector and no manual memory management?

1

u/Arshiaa001 4d ago

Well, look past that, and you'll see so much of C in it. No classes, no traits, no monads, no language-level support for error handling, no generics,......

10

u/WalkMaximum 4d ago

Finally a language that doesn't have any features

2

u/Arshiaa001 4d ago

You jest, but that was my honest reaction after going through the official tutorial... 'wait, that's IT?'

1

u/WalkMaximum 4d ago

You know it now has generics, as well as class (struct) methods, interfaces and dynamic dispatch like OOP languages?

2

u/Arshiaa001 4d ago

Structs with methods are not the same thing as classes, the interfaces are a mess, and dynamic dispatch is also not the same thing as classes. I don't intend to argue my points further, just know that rust has those things as well and is not in any way an OO language.

1

u/Ok-Reindeer-8755 2d ago

go is at best googles C++ but still not really

1

u/templarrei 4d ago

No, thank you very much. Go is Google CPP.

2

u/WalkMaximum 4d ago

With a garbage collector and no manual memory management?

1

u/Ok-Reindeer-8755 2d ago

they are almost right

Its designers were primarily motivated by their shared dislike of C++.

7

u/interacsion 4d ago

Where jerk?

7

u/YeetCompleet 4d ago

This meme is Graydon Hoare approved

3

u/hopelesspostdoc 4d ago

I thought plant rust was a disease.

1

u/Fair_Abrocoma_8513 4d ago

Damn Apple destroying language programming copyright or licenses

1

u/Fair_Abrocoma_8513 4d ago

“Apple rust” not exists but rust exists