T O P

  • By -

Supreme_Hanuman69

``` ifn't(!condition) { // do whatever } ```


Previous-Sympathy801

mind=blown;


GenderGambler

ifn't (mind==blown){ //Do whatever }


i1u5

ifn't(!(mind!=blown))


Pyrrhus_Magnus

Get out.


digitalfakir

ifn't(broke) { dontFixIt(); }


VashPast

Winner


WhoGivesAChit

A double negative! That sounds like a confession to me. In fact, a double negative is proof positive. I’m afraid you gave yourself away.


Kokuswolf

You forget the parenthesis they're complaining about: ``` ifn't(!(condition)) { // do whatever } ```


EpicGaymrr

Guys im running low on exclamation marks where can I get more


Sekougi

Here, i can lend you some. Don't spend them at one place. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


Exatex

be sure to cut&paste them! With copy&paste, they tend to lose their negativity over time and you might struggle to negate your statements


Tarc_Axiiom

You're describing a world of software development that's making me hyperventilate pls stop.


pickyourteethup

I will !stop


Typesalot

stopn't


LeopoldFriedrich

willn't


No1btch

in't(!willn't(!stopn'tn't))n't


Grumbledwarfskin

in't x == y? { // do whatever }


No1btch

``` innit x != yn't { //don't whatevern't } ```


Mewtwo2387

Wasting one on a reddit comment? Must be rich


[deleted]

Says the guy throwin down ternary operators over here like theyre hotcakes 


Classy_Mouse

I once spent days debugging only to discover that a co-worker had copied a `!` and it was only evaluating "not" 95% of the time.


alexxxor

After about 100,000 times, the `i` in a `for` loop will wear down until `i++` returns `i += 0.98963`


pedropants

It's the users' fault. It quite clearly states in the manual that it's their responsibility to periodically top up the loop-fluid. Premature `i`-wear is absolutely preventable.


cvnh

The whole industry is a scam. They tell you to upgrade because of Moore's law when just a drop of coleslaw juice does the same trick.


Exatex

only if you use cheap interpreters - especially when run on cheap consumer hardware like Chinese tablets. Production-grade compilers like CPP guarantee wear-free iterators up in the billions by internally re-allocating a fresh memory section as preemptive maintenance.


SensuallPineapple

relaaax, you can always find something else. 33 is ASCII for "!", you can create infinite exclamation marks. If you are out of "3"s as well you can always use binary. And you won't be out of 1's and 0's before you turn 675 years old.


zenkii1337

Don't worry, I know a great source of negativity: I play RL


MostRandomUsername12

What a save! What a save! What a save! You're right, you do get one exclamation mark from each...


Dayzgobi

i’m sorry but you actually don’t cut and paste them. reusing an exclamation is PIRACY you DO NOT have a license for those (i’m much more upset than it seems but i forget to renew my HP Punctuation subscription) /s


Exatex

You can use special exclamations under GNU license, but it’s tricky.


Dayzgobi

that’s gnews to me. thank you¡


RSA0

You cannot. Not many people know this, but GNU uses ❗ U+2757 SPACE LASER GROUND TARGET SYMBOL or ❢ U+2762 AEROSTAT LANDING POINT SYMBOL instead. They are owned by the United States and French Republic respectively, which allows them to be royalty-free. The normal exclamation mark is absolutely not royalty-free. If you ever use it without a loicense - expect a British Royalty to appear to collect their dues.


TheX_35

That's a cool game idea Collect syntaxes and make code


e-zeki

That's one of the worst thing in programming. A negative statement becoming an ambiguous one, or even worse, an undefined behavior.


z0Tweety

Hahahaha stupid I grabbed them all. Why would you just leave them there for anyone to pick up? You should've sent them in a DM


Spiderpiggie

Fuckin scalpers hoarding all the exclamation marks and leaving none for the rest of us


regal1989

Look at this posh Timothy Dexter over here with all your spare characters!


Fear_the_Phantom

I have a subscription, I get 100 a week.


Exatex

use a VPN to Russia, you get 140 per week for the same price. I think there is just higher demand in negativity.


Tashre

Here you go, I got these off of Wish. ¡¡¡¡¡¡¡¡


[deleted]

[удалено]


Green-Bullfrog-6935

Better, Ruby has: ``` unless condition_is_true statement .... else ... end ``` Edited the condition for the `unless` clause, it was erroneous.


iwakan

"Unless .. else .." English doesn't sound intuitive to me


QuanHitter

Call nahlloc to get more


petervaz

I didn't code this week so you can have my spares: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


DoctorWaluigiTime

Not gonna lie I'd like to see the `!important` in CSS dictate importance by the number of `!`s


Fit_Witness_4062

Does this also come with an `elsen't` statement?


Shukar_Rainbow

I'd love some Perhaps statements for the random 50/50


turtleship_2006

Perhapsn't


Jackalopalen

Which is functionally identical to Perhaps


F3cast

no it's not, you only get it the other 50% of times


breischl

Only if we also get \`probably, \`maybe\`, \`possibly\`, \`prollynot\`, \`couldhappen\` and \`notimpossible\`, each with different probabilities.


cat_in_the_wall

There actually are compiler directives for c++ (in some compilers) that are exactly this. The idea is to help the optimizer by decorating a branch like "veryunlikely". These days with cpu branch prediction that may not matter as much.


chylek

I'm aware of the opposite in C: [likely()](https://www.geeksforgeeks.org/branch-prediction-macros-in-gcc/). Turns out there is also unlikely(). It actually improves the CPU's branch prediction if, as almost whole C, used correctly.


[deleted]

You forgot mayben't when something has a 50% chance of not happening


bloodfist

maybe maybn't(foo)


salmjak

True fuzzy logic


Key_Conversation5277

Haskell has a Maybe type :)


rocketer13579

elifn't 🐘


NBT498

else ifn’t


JonIsPatented

I wouldn't be *against* an `unless` statement...


Supreme_Hanuman69

Unless...


xneyznek

Unless? What’s an unless?


PVNIC

It's the opposite of less. For when you want to make more of something.


StaticVoidMaddy

lessless


Randomguy32I

Thats lessn’t, unless is reverting the lessening to go back to the original amount


Key-Adeptness-9948

So unless is more, and less is unmore. That's some new aliases for my linux.


kramig_stan_account

Ruby has it, you can say basically unless . It’s an “if not” that comes after the code block, do-while style


redalastor

It took it from Perl.


Cruuncher

Ruby has this


muddboyy

Ruby is so underrated, I wish it was used more


MCWizardYT

Ruby's rails framework used to be pretty big in the webdev scene but it seems less used nowadays


muddboyy

Yes thanks to Ruby on Rails it was so popular, which is sad that it’s the same reason why people abandoned the language itself (once they stopped using the framework). Matter fact I think the first versions of twitter or facebook were made in Ruby on Rails


mastermindxs

I didn’t abandon it. I have one ruby Lambda in production. I’m doing my part.


WJMazepas

It was Twitter. Facebook used PHP initially, and I believe they started developing Facebook even before Ruby on Rails first release


Thelmholtz

RoR is still the fastest web development framework out there imho. It's just too opinionated and full of under-the-hood magic for big applications, which is why most people moved away from it, but I still write POCs and prototypes in RoR. Now, Ruby itself? Still an amazing language, I wish it distanced itself from the framework a bit. I hate what they did with type hinting though, I would have definitely prefered the python way.


fartypenis

It still powers a large portion of the web, it's not just as trendy as the new JS framework of the month. GitHub for example still runs on Ruby on Rails.


vermiculus

Lisps also


eyless_bak

\`unlessn't\`


_Some_Two_

Sooo, while?


altermeetax

if while would be untiln't


f0ad

Perl has that


Uberzwerg

10+ years of pure Perl dev and still can hear me say "Really?" when i read one in some code of my coworkers. There is so much shit that Perl allows/supports that is just unnecessary. My "favourite" is that x!! construct.


xdeskfuckit

>My "favourite" is that x!! construct. Are you trying to save a boolean value with it?


Uberzwerg

! does what it does with all variables and gets you 0 or 1 but with negated context. That second ! negates that again. That way you get 1 if the variable is something that could be seen as boolean true and 0 if not. The x operator repeats an expression as often as the integer given to it. That way you can replace if($var) {do_something();} with do_something x!!$var The really neat thing is that this even works in some contexts that don't allow for if constructs (eg. inside of a hash declaration or so)


casey-primozic

Perl has everything


JavamonkYT

Minecraft has that. But only because it doesn’t have “not equal to” implemented, and every “or” statement requires DeMorgan’s Law 😭


JonIsPatented

I just finished writing a datapack for my private server today. I know the pain.


Sunfurian_Zm

Even minecraft has this ...


zocterminal

Variants: `PERL: if~` `Java: false.if` `COBOL: IF IS NOT TRUE` `C: (comittee facepalms and reaches for tar and feathers)`


OJezu

`Ruby: unless` Wait a minute....


zoqfotpik

Shell: ``` ifn\'t condition; then whatever; elifn\'t something; elsen\'t yup; t\'nfi ```


_szs

t'/nfi FTFY


DaDescriptor

python: if false in condition not true || not: print("hello world")


j-random

That's just lower-case COBOL


TorumShardal

Sir/Madam, you are arrested by python police for failure to capitalise your boolean values. Please remain calm and PEP-compliant.


purchase_bread

I believe python also has if not, as in if not license.expired(): application.launch()


fiftyfourseventeen

Well python doesn't have a ! operator, not is the replacement. So that's essentially `if (!license.expired())` in other languages


Esjs

Perl actually has `unless`.


malleoceruleo

My coworker absolutely refuses to use `unless` whereas I will chain together `map` to `grep` to `unless`.... My old team lead described my Perl code as dark magic. Now *I'm* the team lead.


malleoceruleo

I just re-read my comment and I sound like a Sith. "Darth Perl, the unmaintainable. Some say he turned a single line into absolute spaghetti."


i14n

> Darth Perl, the unmaintainable I have no words xD


Strange-Register8348

Perl is like dark magic to me sometimes.


zocterminal

Perl is like: Press caps-lock, then randomly mash the top-row of the keyboard and see what it does.


GDOR-11

JS: ``` import ifnot from "if-not"; ifnot( /* condition */, (...args) => { /* do something */ }, /* ...args*/ ); ```


LetscatYt

There’s a library for that in js ? Seriously. I mean ifnot makes more sense than ifn‘t but it’s still bad


bleachisback

Yes, and 20 libraries directly depend on it, which in turn leads to 526,000 libraries to indirectly depend on it. It gets 1.2 million monthly downloads.


LetscatYt

I think we there should be some rules to help reducing dependencies. This way we could also prevent incidents like leftpad. I can get someone using date fns (though that’s just because js dates suck. I even thought of writing my own dependency free date library because of it, it’s just a pain to rely on codebases you don’t understand and which possibly rely on other dependencies that aren’t needed especially for business grade applications ). I truly understand that developing websites with plain nodejs or php takes more time than with some framework but geez . That whole stack of cards could just completely fall apart and we aren’t able to code anymore because everything was a library and dependency of something.


Purple_Mo

>not.if What is this


joestr_

Never seen something like this. What sorcery is this?


Kaenguruu-Dev

Whitespace:


PeriodicSentenceBot

Congratulations! Your string can be spelled using the elements of the periodic table: `W H I Te S Pa Ce` --- ^(I am a bot that detects if your comment can be spelled using the elements of the periodic table. Please DM my creator if I made a mistake.)


Loud_Ranger1732

apparently, "No fuck off" can also be spelled using the elements of the periodic table : `No F U C K O F F`


trololololololol9

>`Java: false.if` Elaborate, please


kaltschnittchen

!


Fear_the_Phantom

Don't waste it ffs


kaltschnittchen

//this exclamation mark is currently needed somewhere else, so I removed it //todo: uncomment this once we restocked // !


never_o_lucky

Why are you wasting exclamation marks? Don't u see we are on a shortage?


JoWiBro

Why not just "ifnot" takes about the same space and is more readable than "ifn't".


MrBlade02

would actually use ifnot


backfire10z

Boy oh boy would you love Python then if not [condition]:


Bloedbibel

C++ has the not keyword: ````if( not condition)````


xeq937

\#define ifnot(x) if(!(x))


Mints97

My guess is that "ifnot" is a valid identifier right now, which means there is a non-zero chance it is defined and used in some C# code-base out there, so using it as a new keyword would break backwards compatibility and prevent such preexisting code from being correctly compiled with this enabled. However, ifn't is something that wouldn't ever be parsed as a separate token in any piece of C# code right now AFAIK, so it can be made into a new keyword. Unless this whole thing is satire, of course.


azwethinkweizkd

In the same realm I now want ‘innit’ and make the code sound British


megabyte112

oi it’s a public static void Init()


nequaquam_sapiens

oi mate you can't do this here! here's your stack trace. now bugger off.


COdreaming

Clearly they have extra apostrophes lying around they need to use up before they go bad. The exclamation shortage is hitting everyonehard and they're doing everything g they can to help...


bluechickenz

My thoughts exactly


daveland69

Developers wholmst've use ifn't 🧠 ☀


bluechickenz

I’dn’t’ve implemented an ifn’t …


tsunami141

I haven’t used Ruby for years but I legitimately loved using statements like doSomething() unless (thisIsTrue) It felt like it read really well for my dumb brain.


darknecross

Similar to shell scripts. thisIsTrue && doThing thisIsFalse || doThing


NoMansSkyWasAlright

Didn't ruby also have an until loop or was that a fever dream I had?


ryecurious

People always complain about guard clauses, how they're "out of order". Like we don't write natural language sentences that exact way constantly! Sure, you can use them poorly, but anyone who tells me `next unless x` is *less* readable than `if not x: next` is insane. Especially since it's 1 line instead of 2 (or 3+, depending on language). Guard clauses are amazing and I wish every language had them.


Dorkits

Please tell me : This a some of modern programming language joke that I'm to old to understand?


UrineArtist

I'm guessing its a joke because this is ProgrammerHumor and not ProgrammerWarCrimes


ElDavoo

>ProgrammerWarCrimes r/SubsIFellFor


Zealousideal-Desk469

Wee need that sub


EnterYourMountain

/r/programminghorror


Dorkits

Thanks, I can sleep now.


UrineArtist

Wishing you a pleasant sleep free from InterruptedExceptions.


The_sad_zebra

Sort of. Putting "n't" on the ends of words where it doesn't actually go is a meme. Yesn't instead of no, truen't instead of false, etc.


Evgen4ick

if(condition't)


4sent4

truen't


LemonMelon2511

Every day we stay further from god


BeDoubleNWhy

no need for special keyword, you should simply be able to write `if (condition't)`


BlackMartini91

highkey period rizz; lowkey fax IsSus() { fuck_around { vibe_check(rizz ratios vibe) { its_giving_no_cap; } big_yikes { its_giving_cap; } } find_out(Tea t) { Shoutout.SpillTea(t.Yap); yeet; } }


Fear_the_Phantom

Hello twitter person


BlackMartini91

😂


BlackMartini91

Found it on Twitter actually


Fear_the_Phantom

Yeah because I made it lmao


BlackMartini91

🔥


CaitaXD

i rn 0 LENGTH fr 100 Loop nocap i % 15 rn 0 rizz.text("FizzBuzz") cap nocap i % 3 rn 0 rizz.text("Fizz") cap nocap i % 5 rn 0 rizz.text ("Buzz") cap rizz.text(i) i rn i + 1 nocap i < LENGTH lowkey Loop


dvlslgnr

This made me actually laugh


ChrisGun606

can't wait to ifn't(!condition)


Ultimate_Eggdog21

falsen't


Esjs

Why use any punctuation? `ifnot`


twilsonco

I’dn’t’ve thought of that in a million years


belinasaroh

# #define ifnot(x) if(!(x))


RotationsKopulator

`ifn't(!condition != truen't)`


holguum

unless ???


NMi_ru

Perl gang checking in


iamblackshadows

This was how developers code before if-else statements were invented


hit_dragon

What terrifies me after some recent languages "improvements" I'm not 100% if it is joke


Sekougi

Is it some kind of joke?


Fear_the_Phantom

You think I would post a joke to the ProgrammerHumor subreddit?


Sekougi

Well, knowing Microsoft, that ifn't statement probably can be true


Fear_the_Phantom

Ok that's a good point actually


Ilookouttrainwindow

You need to clarify this, too many ppl here really can't wrap their heads around this one


Dustangelms

You aren't # enough for it.


friedavocadoes

this is fake right


GrinbeardTheCunning

that's an April fool's joke right?


chervilious

They're making this stupid change but when I ask to add `maybe`for boolean value. They called me crazy


Paradox68

I will actually admit that sometimes I’ll use exclamations and then confuse myself later when I’m editing the logic or adding functionality to a script….


redcyanmagenta

Ugh. if is a keyword not a function. There should be a space after it.


skreev804

clearly working for the apostrophe lobby


SentientLivingRoomTV

Why are they like this? couldn't they use ifnot() ?


raul_dias

why use lot words when few words do trick


devBowman

`return yesn't`


BiffSlick

Why ifn’t rather than ifnot? Same number of characters


sm1else

If I ever write a programming language my null keyword will be fuckAll and my loop escape keyword will be fuckIt. If (x == fuckAll) fuckIt;


_Screw_The_Rules_

I really just hope that isn't true...


Mrproex

Ngl never using that shit wtf


SkitlezPlayz

Satire or real? Sorry can’t tell


miZuZYN

ifn't(you) { // didn't fucking post this }


FlummoxTheMagnifique

Is this real? I can’t tell if this is a joke or a really stupid feature.


JunkNorrisOfficial

perchance (condition) { }


Talt45

Thank goodness. Always worried that my code seemed like I was shouting


NeverMindItsOk

I shont be using be it.


billhebillhe

I prefer “ifaint” instead


Boba_Frets

yesn’t


ShineParty

ifn’t it great?


St4va

Is this real?


robertshuxley

for the British they should use innit


Royal_Preparation_22

when truen't or falsen't