@Lady @wallhackio @vaporeon_ ftr i didn't actually end up thinking switch (true) was better and wouldn’t do it again because it’s just about equally as terrible as that
@wallhackio @vaporeon_ when was the last time you actually had to complain to me that it was broken
@vaporeon_ @Lady @wallhackio they’re optional in javascript :3
@wallhackio @vaporeon_ banning the syscatmin… sure that would go down well :P
@vaporeon_ @wallhackio i just irrationally hate if /else if /... that much
@wallhackio @vaporeon_ the equality check on strings in most languages with a string type is an implicit strcmp, yeah. python does this
@vaporeon_ @wallhackio you wanna see some real fucked up shit? switch (true):
// the navbar links to every chunk of the gallery.
// the current page does not get a link.
// index 0 links to `/`.
/** @type {Node[]} */
const linksByIndex = [];
for (let i = 0; i < chunkedImages.length; i++) {
switch (true) {
case i === chunkIndex:
linksByIndex.push(li({ class: "active" }, `${i + 1}`));
break;
case i === 0:
linksByIndex.push(li({}, a({ href: "/" }, `${i + 1}`)));
break;
default:
linksByIndex.push(li({}, a({ href: `/${i + 1}.html` }, `${i + 1}`)));
}
}
not a serious take
@wallhackio not an undergrad but purrsonally i just despise how if-elseif chains look
@vaporeon_ meow meow meow
@vaporeon_ lynx is a category of felid that includes bobcats
@vaporeon_ feels like this shouldn’t be too hard to implement and i’m kinda surpurrised it doesn’t seem to exist yet
@coriander i just reread and misread this toot as saying “piss merchant” and i am now amused at the concept
@wallhackio no
@wallhackio purrobably not
the thing about @wallhackio showing me gone as my furst hyperpop-era charli xcx song is that she might not have ever topped it
it’s pronounced “ashling”. canonically a black housecat or any of the grass cat pokémon, but currently experiencing daily TFs. Commewnist. it/she and more. i automatically change my pfp on the furst post of the day. (i suppurrt PluralDawn (https://exa.y2k.diy/garden/pluraldawn/) fur when i want to spontaneously change form fur a post or two)
GlitchCat syscatmin and meowstodev; @ me about techincal problems with the instance, or fur feature requests. i got a job due to some extent to my work on this instance
i am the kind of furry who is a weirdo horny freak (affectionate) about it but i don’t talk about that much on this account
available via email with the same username and domain. DM/email for other purrotocols
workplace policy is to clarify that all of my opinions expressed here are my own, and not those of my employer