this post was submitted on 19 Jun 2025
27 points (90.9% liked)

Programming Humor

3205 readers
1 users here now

Related Communities !programmerhumor@lemmy.ml !programmer_humor@programming.dev !programmerhumor@kbin.social !programming_horror@programming.dev

Other Programming Communities !programming@beehaw.org !programming@programming.dev !programming@lemmy.ml !programming@kbin.social !learn_programming@programming.dev !functional_programming@programming.dev !embedded_prog@lemmy.ml

founded 2 years ago
MODERATORS
 

Made with KolourPaint and screenshots from Kate (with the GitHub theme).

top 13 comments
sorted by: hot top controversial new old
[–] DmMacniel@feddit.org 5 points 2 weeks ago (1 children)

I see your TypeScript and raise you kotlin:

var a: String
[–] uranibaba@lemmy.world 1 points 2 weeks ago (1 children)

What’s up with that syntax? Why the use of var here?

[–] DmMacniel@feddit.org 3 points 2 weeks ago* (last edited 2 weeks ago) (1 children)

Kotlin knows mutable and immutable variables. var indicate mutables and val would indicate immutables (comparable with the final modifier in java and const in JavaScript/TypeScript).

[–] uranibaba@lemmy.world 1 points 2 weeks ago (2 children)

So a var can start as a string and later be an integer?

[–] DmMacniel@feddit.org 2 points 2 weeks ago

No, the type is strict and fixed.

[–] guillem@aussie.zone 2 points 2 weeks ago

I don't know Kotlin but in other languages "(im)mutable" refers to the value, not the type.

[–] cathfish@lemmy.world 5 points 2 weeks ago (1 children)
[–] Lemminary@lemmy.world 2 points 2 weeks ago

Say that again, motherfucker! 🔫

[–] 30p87@feddit.org 5 points 2 weeks ago (1 children)

TypeScript vs Java?

char a[69]; btw.

[–] Blue_Morpho@lemmy.world 4 points 2 weeks ago (1 children)

Why have String when we have a perfectly good array at home?

[–] DmMacniel@feddit.org 3 points 2 weeks ago

because char* sucks

[–] Kolanaki@pawb.social 2 points 2 weeks ago* (last edited 2 weeks ago)

When String a without being told Let a: String -

"Ah ah ah! Simon didn't say!"

[–] sentient_loom@sh.itjust.works 1 points 1 week ago

To keep the casuals away