Slacker News Slacker News logo featuring a lazy sloth with a folded newspaper hat
  • top
  • new
  • show
  • ask
  • jobs
Library
← Back to context

Comment by dllthomas

12 years ago

Better not to pun, and use an actual optional where you want it...

2 comments

dllthomas

Reply

jhallenworld  12 years ago

Eh, I like my C idioms. With C++ it's easy to make it safe so that accessing an unassigned string doesn't cause a crash (make NULL equivalent to empty strings except for tests).

I have the same gripe with the way the STL is designed. Too tedious to test for empty first before reading an item.

Slacker News

Product

  • API Reference
  • Hacker News RSS
  • Source on GitHub

Community

  • Support Ukraine
  • Equal Justice Initiative
  • GiveWell Charities