@vaporeon_ I am not a C expert by any means, but my exploration of C++ has taught me a few things. Header files in C++ have proven to be a headache in a lot of situations, and these are more or less fully inherited from C

Since you pull in everything present in a header file you pollute namespaces which can be a nightmare to manage in large projects

Plus header files induce some code repetition

For reasons I don't understand header files also make it difficult for C++ programs to compile quickly

if you recognize the midori sample in the fourth song then you have super adhd

Show thread

@Lucy drinking oolong from the same tea leaves five times my beloved

re: no image descriptions 

@aescling @vaporeon_ sure Brandon Eich, why not do that

re: incorrect 

@sudo_EatPant the reason we say nullish is because the language has two "null-like" values (undefined and null) where most languages only have one. So we say "nullish" to refer to either of these two values

@vaporeon_ might not be an issue if you have runtime type checking before the query, or if your JavaScript is compiled/transpiled from TypeScript, or if you have extensive confidence in your software testing

@vaporeon_ there are non-nullish values that are coerced to false. or x could be false itself. That means the following values would also be treated as nullish:

false
""
0
-0
0n
NaN

@aescling at work we had that but for a function called "exists"

@aescling is that a function you define elsewhere in your program?

Your preferred style(s) for checking for nullish in JavaScript:

re: oh yeah, this is long. 

@The_T @monorail @aescling thanks for the thoughtful response, much appreciated!

Show older
📟🐱 GlitchCat

A small, community‐oriented Mastodon‐compatible Fediverse (GlitchSoc) instance managed as a joint venture between the cat and KIBI families.