13
RTRMS
5y

Forgive me for I have sinned.

I feel like I need a bleach shower after having had to write these methods in my Dart codebase

Comments
  • 1
    I... cannot
  • 1
    I think you repeated same if else.
    I might be wrong or not, code completion blocks.
    Check your extension func.
  • 3
    @melezorus34 nope, check the casing, the api that inconsistent that they are spelt differently depending on the call.
  • 1
    Why 3 returns in the first function?
  • 1
    @AmbientTea Yeah just return A or b
  • 0
    @RTRMS makes sense, thanks
  • 0
    Yeah, go ahead and shower with bleach for you coded with Dart
  • 0
    @CodeTalker ahh, you must be a php guy...
  • 1
    @RTRMS Not even close, I hate PHP way more lol
  • 0
    I'd negate the first function so its name is truthy, as that would make any usages a little easier to read. Like "present" or "populated" instead of "notMissing"

    Other than that, it just looks like a utility function? I dont know if there's a better / more acceptable way of doing this in Dart.

    Edit: algo necro 🙁
  • 1
    @Root it's less about doing it better and more about having to have done it at all, I should not have an api returning maybe a string maybe a number for the same key.

    ID totally go postal if one day it randomly decides to return a double instead.
Add Comment