Earlier quoted context omitted.
What question does the exit code answer? Are there any errors? No (0) there are no errors. The concept of using 0 to mean false is not new to javascript is what I was getting at.
The question it answers is "what was the exit status of the process", where zero typically means success, and non-zero means that there was some kind of error or exceptional exit condition. The most important difference from a boolean is that the exit status is often used to enumerate several kinds of exit conditions, some of which are defined in POSIX (sysexits.h). In a shell, for example, the 0 exit status is norma…
Getting Started with Algorithmic Cryptocurrency Trading
41–45 of 45 posts
Re: Getting Started with Algorithmic Cryptocurrency Trading
#42Earlier quoted context omitted.
The question it answers is "what was the exit status of the process", where zero typically means success, and non-zero means that there was some kind of error or exceptional exit condition. The most important difference from a boolean is that the exit status is often used to enumerate several kinds of exit conditions, some of which are defined in POSIX (sysexits.h). In a shell, for example, the 0 exit status is norma…
Pretty sure that we can all agree that bash is a complete unintuitive dumpster fire, so that doesn't count.
Let's just leave it at C languages + Python, which account for a large percentage of developer mind-share, so to say that it's unintuitive that 0 is falsey is either disingenuous or slightly ignorant.
Re: Getting Started with Algorithmic Cryptocurrency Trading
#43Re: Getting Started with Algorithmic Cryptocurrency Trading
#44Earlier quoted context omitted.
The question it answers is "what was the exit status of the process", where zero typically means success, and non-zero means that there was some kind of error or exceptional exit condition. The most important difference from a boolean is that the exit status is often used to enumerate several kinds of exit conditions, some of which are defined in POSIX (sysexits.h). In a shell, for example, the 0 exit status is norma…
Pretty sure that we can all agree that bash is a complete unintuitive dumpster fire, so that doesn't count.
You say that it answers the question "Are there any errors?", but that's just one possible boolean interpretation of the status code.
That said, I don't know of a shell that doesn't interpret zero status as true, because true(1) and false(1) in Unix returns status zero and non-zero respectively. It's not just Unix, it's Windows, DOS etc. In that sense, the prevalent boolean interpretation is that it answers the question "Did the process end with a success status code?", the exact opposite of what you think.
That you or anyone else finds bash or this boolean interpretation in general unintuitive is besides the point, and ignoring that I've already said half of this to complain about bash is a pretty rude way to short-circuit a discussion.
Re: Getting Started with Algorithmic Cryptocurrency Trading
#45Earlier quoted context omitted.
Lmao Oh JavaScript first you steal time by being an unproductive language and now you help lose money because you’re not an industry grade language smh.
Unproductive, how? Also, this isn't a javascript problem; this is a problem of trying to be too clever and not understanding implicit conversion, which happens in many languages.
And that doesn't happen in many decent languages. That is, languages with strong typing.