29
12

Why make it complicated?

11mon 3d ago by lemmy.ml/u/HiddenLayer555 in programminghumor from lemmy.ml

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

a = ""

Say that again, motherfucker! 🔫

I see your TypeScript and raise you kotlin:

var a: String

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

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).

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

No, the type is strict and fixed.

TypeScript vs Java?

char a[69]; btw.

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

because char* sucks

When String a without being told Let a: String -

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

To keep the casuals away