Skip to main content
edited body
Source Link
candied_orange
  • 119.7k
  • 27
  • 233
  • 369

I contend that theirthere are two fundamental reasons this is a smell: structure and semantics. You are poking holes in the structure argument. And you have a point.

I contend that their are two fundamental reasons this is a smell: structure and semantics. You are poking holes in the structure argument. And you have a point.

I contend that there are two fundamental reasons this is a smell: structure and semantics. You are poking holes in the structure argument. And you have a point.

edited body
Source Link
candied_orange
  • 119.7k
  • 27
  • 233
  • 369

There's more than one reason to avoid passing Bools, more thatthan one way to avoid passing them, and some of those ways don't really help.

There's more than one reason to avoid passing Bools, more that one way to avoid passing them, and some of those ways don't really help.

There's more than one reason to avoid passing Bools, more than one way to avoid passing them, and some of those ways don't really help.

added 1 character in body
Source Link
candied_orange
  • 119.7k
  • 27
  • 233
  • 369

Problem is, that last one isn't legal Java (it's legal C#). But it largely solves the semantic problem. Just not the structural one (suppose someone wants fractions of turns).

Ugg.

I'd say this

int status = fuelRod.rotateByRadians(0.5);

is the clear winner here. But to apply that to your example I need better names than obj and doSomething. Please don't ignore the semantics.

Problem is, that last one isn't legal Java (it's legal C#). But it largely solves the semantic problem. Just not the structural one.

Ugg.

Problem is, that last one isn't legal Java (it's legal C#). But it largely solves the semantic problem. Just not the structural one (suppose someone wants fractions of turns).

Ugg.

I'd say this

int status = fuelRod.rotateByRadians(0.5);

is the clear winner here. But to apply that to your example I need better names than obj and doSomething. Please don't ignore the semantics.

added 1 character in body
Source Link
candied_orange
  • 119.7k
  • 27
  • 233
  • 369
Loading
Source Link
candied_orange
  • 119.7k
  • 27
  • 233
  • 369
Loading