logoalt Hacker News

MrMcCall12/17/20240 repliesview on HN

Sure, but as a programmer, my job is to specify and code out the semantics of the system. ANDing and ORing a set of bools may very well be different for one list's semantics than another's.

So, the initial value that forms the basis for those computations -- to my mind and experience -- is as related to the value computed for the empty set as the programmer decides it should be. I don't think that function's default will necessarily be the proper semantic result when applied to the empty set.

As an example, why should "Are all hats green?" have the same result as "Are all hats NOT green?"? If the logical computation's initial value is the automatic result, then you have merely answered the mathematical-logic answer to a question about sets, not about the list of real-world things being modeled.

If one is writing pure math software, then the answer will be the pure math logical result. When one is modeling a real-world system, the semantics require another level of specification, in my experience and opinion.

(Good morning. I've never replied to such an old comment before. I do not yet have software to monitor my active conversations around here, and am only just beginning to entertain undertaking such a project, so it is merely luck of the universe that I found your interesting comment this morning. Thanks. It's like a mental warm-up as I begin my day.)