5
donuts
8y

Agree or disagree?

I disagree.... When debugging, I'd like to breakpoint here (inside the DAO class) and see the results.

Comments
  • 1
    I agree(with you), it helps structure your code a bit more and it is easier to read.
    One could argue that it's taking more time with the whole assignment of the calculation before returning but honestly with processors these days it won't make a difference.
  • 1
    I believe with intellij you can put a breakpoint on the closing bracket, or otherwise set a method breakpoint.
  • 1
    @LucaScorpion but since the evaluation is not assigned, you'd have to call it again or I guess go up one level to get an object that it's assigned to. But then you just jumped and lost the callstack.

    And if it's called within an anonymous function... Then...
  • 1
    @marceliwac this I'm OK with although if you add even more conditions, I would do an if else structure.

    The problem with mine is to evaluate the result again, without an assigned variable you gotta get the results again.
Add Comment