Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
glastra
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
17 ms
·
151.
▲
by
glastra
11y ago
I fail to see where you're trying to get. c, e and h all have units and are measurable.
152.
▲
by
glastra
11y ago
Indeed, the author conveys the wrong message when implying that only pure numbers have no units. Measurable quantities, as you point out, can also have no units. Another point that throws me off is the Vulcan scientist part. They would need
153.
▲
by
glastra
11y ago
This so-called fascination and search for meaning or reason behind constants reminds of the anthropic principle [0], which basically goes like this: "things are the way they are because we wouldn't be here to observe them otherw
154.
▲
by
glastra
11y ago
The submission title is a bit misleading. First I read it as "the reason Apple products aren't made in China is because that would be cheaper". Perhaps rephrasing to "Apple products are made in China not because it'
155.
▲
by
glastra
11y ago
> Early returns reduce the complexity of a method by reducing the number of possible states as you move through the method. As I said in other comments, early returns for exceptions and bad input are fine. They are exceptions, though, no
156.
▲
by
glastra
11y ago
I cannot measure that on anyone else other than myself. This is a place to express opinion. I've read (and sadly written) enough code in both styles to know what _I_ (and all the peers I've bothered to ask with concrete examples,
157.
▲
by
glastra
11y ago
Exactly. See single return statement, highlight variable, see branch structure at a glance, ???, profit.
158.
▲
by
glastra
11y ago
I was speaking from a general point of view. I find early exit on validation failure acceptable, although it'd make more sense to use exceptions and not a simple return. A sufficiently complex method with 5 return statements all scatte
159.
▲
by
glastra
11y ago
To me, this only makes sense if you always read source code sequentially. Humans are not machines, and most often you will not be reading code (especially code with branches) in a top-bottom manner. Having multiple return statements in a me