necovek 3 months ago

I though we were past naming variables by their types? That's what their types are for.

So try naming it about what is it promising to have?

  • c5n8 3 months ago

    What would you name it?

    • necovek 2 months ago

      What is it going to have as the value?

      • c5n8 2 months ago

        a promise that, if fulfilled, will return an object of uncompleted todo

        • necovek 2 months ago

          Something to the tune of "unfinished", "uncompleted"/"incomplete" or — even better — "outstanding".

          I avoid negatives when I can, so I'd go with `outstandingTask` or `outstanding_task` (or `todo` if that's the term you use throughout the application).

behnamoh 3 months ago

I have this convention:

    <group-name><object-name><object-type>
So in your case:

    ToDoPromise
if it's the only todo.
  • c5n8 2 months ago

    I could see what group name is. What sets apart object name and object type? Because, both Todo and Promise are object type.

zzo38computer 2 months ago

I would think it would depend what the meaning of the variable is? Usually, it is not only the type which is relevant, I think.