Logo
A SQL query walks into a bar, walks into a bar, walks into a bar...
  • Home
  • Hot
  • Random
  • Search

Browse

  • AI AI
  • AWS AWS
  • Agile Agile
  • Algorithms Algorithms
  • Android Android
  • Apple Apple
  • Azure Azure
  • Backend Backend
  • Bash Bash
  • C++ C++
  • Cloud Cloud
  • All Categories
As an Amazon Associate ProgrammerHumor.io earns from qualifying purchases.

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

Friend-classes Memes

Posts tagged with Friend-classes

Friends Will Be Friends

C++ Programming
6 months ago 428.2K views 0 shares
Friends Will Be Friends
Someone's asking if using friend classes is frowned upon, and the top comment drops the golden rule: "Don't let friends touch your privates." For context, the friend keyword in C++ lets another class access your private members, which is basically punching a hole through encapsulation. It's like giving someone the keys to your house and saying "please don't go through my underwear drawer." Most devs consider it a code smell because it creates tight coupling and defeats the purpose of access modifiers. If you need a friend class, your design probably needs a refactor. The double entendre here is *chef's kiss* — both a programming best practice AND life advice wrapped in one sentence.

Today's picks

Employee Vs Freelancer Vs Founder Vs Vibe Coder

Employee Vs Freelancer Vs Founder Vs Vibe Coder

Programming
291.2M views 14 days ago
NordVPN

NordVPN

Sponsored
VPN
WESTREE Dual Monitor Stand Riser, Wood and Steel Multi-Purpose Desktop Storage Stand for 2 Monitors for Computer, Laptop, Printer, TV, Rustic Brown

WESTREE Dual Monitor Stand Riser, Wood and Steel Multi-Purpose Desktop Storage Stand for 2 Monitors for Computer, Laptop, Printer, TV, Rustic Brown

Affiliate
$29.99