Timeline for codekata: Binary search on an int array
Current License: CC BY-SA 4.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 29, 2019 at 14:55 | comment | added | t3chb0t |
@RolandIllig mhmm, a matter of taste... I find the new exception expression ?? throw ... that is used here is simpler.
|
|
Jun 29, 2019 at 12:59 | history | edited | dfhwze | CC BY-SA 4.0 |
test cases
|
Jun 29, 2019 at 12:47 | comment | added | dfhwze | @RolandIllig I don't like an if without parentheses, unless the statement within is very short and I don't like a full-on if block if I can avoid it. This is a typical scenario where I would go with the null-coalescing operator. | |
Jun 29, 2019 at 12:44 | history | edited | dfhwze | CC BY-SA 4.0 |
adjusted after comments
|
Jun 29, 2019 at 10:54 | comment | added | Roland Illig |
Why did you write subject = subject ?? instead of the simpler if (subject == null) ?
|
|
Jun 29, 2019 at 7:57 | history | answered | dfhwze | CC BY-SA 4.0 |