HN user

flqn

123 karma
Posts0
Comments96
View on HN
No posts found.

This is a good change. Potentially ambiguous to read syntax is being made clearer in a way that harms no previous code substantially.

I sometimes wonder if the comments that say nothing more than "C++ is too complicated" are from people who use it regularly, much less people who are even commenting on TFA

Can't pass a PhoneNumber to a function expecting an EmailAddress, for one, or mix up the order of arguments in a function that may otherwise just take two or more strings

Since the optimiser is allowed to assume you're not invoking UB, and strlen of null is UB, I don't believe that it would consider that case when optimising this function.

That would certainly catch nearly all migration issues, but it doesn't provide a helpful error message like a test for a specific mistake like this does.

Ideally both approaches would be used, with the general case being used to detect and inform more targeted tests.

The Ninja files being that huge is likely more to do with the Android build environment or the tool that generates them. The main advantages of Ninja as a build executor are that the language is simple and it processes the build graph very quickly.

Is the moon not already tidally locked? The same hemisphere of it always faces the earth. Is there a different kind of tidal locking or orbital resonance it will settle into?

I disagree, it's more an argument that even though advancement of human capability can bring great gains (defeating the dragon) we need to pursue equitability in these gains or otherwise they are unethically allocated.

The rising tide should raise ALL boats, otherwise inequitability will lead to social instability as seen througout human history so far.

A well written fable, but its moral would not be equitable in the world of today. It's inevitable that access to "defeating the dragon" would be available to only the most affluent in society, whom have also led the most comfortable lives. There is no fairness in allowing these people to enjoy extended or indefinite lifespans whilst countless others suffer inhumane conditions only to die early.

In this case you are assuming not to have P. The traditional idea of "pick 2 of 3" with respect to CAP is weirdly formulated because you either have a distributed system, in which case P is a given and you must trade C vs A, or you don't have a distributed system and can therefore have both C and A.

Not so much "error reporting" as "there is no meaningful return value" for a position in a string -- if it wasn't found, it doesn't have a position.

If you use either Optional or Result you don't need to choose a special value like -1 to be your "invalid string position" case which could be used incorrectly.

I'd argue it's largely stylistic for this example, especially so outside of functional programming niches.