TypeScript is Quantum Ready
TypeScript is Quantum Ready
TypeScript is Quantum Ready
Put it in an if-else and it executes both blocks.
But only if you don't look
- if else
+ if and else
if or else
Fun fact I learned today - you know how when there's a compound conditional, the interpreter stops once the result is known? (Eg, if the left side of an and is false, it's false so it doesn't bother checking the second condition)
Apparently, visual basic doesn't do this thing every other language I know of does... It might be a debug only thing for the convenience of the depreciated ide I'm forced to use, but I did a null check && called a function on it if it's not null, and it blew up
I pride myself on my ability to change to a new programming language and make progress on day one, but vb is truly the most disgusting POS language I've ever seen. From syntax to jarring inconsistencies in language design, it's just gross
Here is one of the programmers who is quantum ready as well
doesn't the CPU already do this?
Screw else statements, people who use if-return have 180% more readable code.
Because everyone knows a function stops at the if-else. Nothing ever happens afterward.
It's much more readable when you use else depending on the checks. You can still use return in an else block.
def Allowed()
undefined
if name == "Octopus1348": return True elif name == "Bobert": return True else: return "You are not allowed to use this script."
print(Allowed())
`
Schrödinger's boolean
Known to cause heisenbugs. They're bugs that disappear when you try to measure them with a debugger or a printf.
So regular bugs then.
Weird. Booleanish
isn't a built-in, I'm pretty sure. I'd like to see the definition.
This looks like javascript so let me guess the typescript definition
any|unknown
this is a joke, please chill
That gave me an idea: A variable that is only defined when observed by a debugger, otherwise it's null.
How about an instruction that jumps only when a debugger is attached? Cause that exists.
Call me when defining it a second time makes it guaranteed false again.
HOW?