40

Why use boolean for a simple flag when you can use a fucking nullable string? Kurwa no.

Comments
  • 5
    I imagine some "refactor" later, some new programmer, forced by new requirements, changing this with:

    if ( $full == 'empty')
  • 1
    @deviloper fortunately we're dumping this shit project soon and writing new version from scratch
  • 2
    @kacper3w New version, new atrocities (different than these) :D
  • 0
    What kind of black magic is this??
  • 0
    @maushax I think you'll find it's *mine* that's better.
  • 1
    That's a fucking gem right there
  • 1
    Use a nullable boolean and have three possuble values
  • 0
    @kescherRant I actually unironically do that sometimes on C# when I need a "maybe" value.
  • 1
    @Lor-inc if only there was some magigal construct in C# that would allow you to do just that semantically correct...

    https://docs.microsoft.com/en-us/...
  • 1
    @kacper3w Can you make one state of an enum mean true, the other false, and the third throwing a compiler error?
  • 0
    The compiler forcing me to handle the null state explicitly helps in many cases.
Add Comment