top | item 41476239

(no title)

gnuvince | 1 year ago

> Just look at the code. How could it be simpler?

Cannot tell if this is a joke.

discuss

order

Aeolos|1 year ago

Which part do you find complicated?

The code itself looks very straightforward, two preconditions and a loop. I don't see any significant difference in terms of complexity compared to any other low-level systems programming language. It's obviously a bit more verbose than python or haskell, but those are not targeting the same audience.

IshKebab|1 year ago

It looks extremely simple to me. I definitely have never seen a simpler binary search implementation (though in fairness it punts the midpoint calculation). Why do you think it's a joke?

johnisgood|1 year ago

Yeah, Perl is simple, too, then.