Menu
CSS is awesome { overflow: hidden; }
Home
Hot
Random
Search
Browse
AI
AWS
Agile
Algorithms
Android
Apple
Azure
Backend
Bash
C++
Cloud
All Categories
HTTP 418: I'm a teapot
The server identifies as a teapot now and is on a tea break, brb
HTTP 418: I'm a teapot
The server identifies as a teapot now and is on a tea break, brb
Elvis-operator Memes
Posts tagged with Elvis-operator
It's Just A Little Helper Why Do You Treat It Like Satan Himself
Kotlin
Programming
Python
2 months ago
64.2M views
0 shares
Most languages make you write out the full ternary operator like a responsible adult: condition ? exprIfTrue : exprIfFalse . But Kotlin and Python? They looked at that and said "nah, too verbose" and gave us the Elvis operator and inline if expressions that let you skip the false case entirely. Python's value if condition else default and Kotlin's value ?: default are genuinely useful for null-coalescing and default values. But the programming community treats them like they just committed a war crime against readability. Meanwhile, these same developers will nest 7 levels of callbacks and call it "clean code." The smug anime character face is exactly how Kotlin and Python devs feel when they write name ?: "Anonymous" while their Java colleagues are still typing out name != null ? name : "Anonymous" like it's 1995.
Today's picks
Simple Houseware Desk Dual Monitor Stand Riser with Drawer, Maple
Affiliate
$39.97
My ancient Linux Box IRL
Programming
159.3K views
4 years ago
I see your Volume Input and raise your my Phone Number Input
Programming
149.9K views
5 years ago