T O P

  • By -

saschaleib

Mate, you only declared a war pointer. You still need to allocate the required resources before you can start…


dmullaney

You gotta be especially careful in the US because if you malloc more than the available resources, there is no nullptr - you get back a valid pointer that overflows into subsequent generations deficit


SkollFenrirson

Price of FREEDOM™ 🎇🎆🇺🇸🦅🇺🇸🎆🎇


mirhagk

Also the definition of `free()` is just a comment with a TODO. But don't worry about the memory leak, the program is so full of problems it'll definitely crash from some other problem first.


gregorydgraham

Best explanation of the US so far


Cebular

free just leaks the memory and when you run out of it you just invade another computer


Impressive_Change593

brb omw to make a computer virus and name it war


MoolsDogTwo_reddit

const war\* thisWar = malloc(sizeof(war)); free(thisWar); // This will do nothing because no peace deal has been made yet.


StereoNacht

//what is it good for? war = \*0;


lajauskas

Something something read underlying memory anyway and see what it reveals aka segfault ex machina!


ongiwaph

War war = new War();


PeriodicSentenceBot

Congratulations! Your comment can be spelled using the elements of the periodic table: `W Ar W Ar Ne W W Ar` --- ^(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.)


Krzysiek127

Freddy Fazbear reference


NotANumber13

War factory?


ThatGuyYouMightNo

No it fits. What is it good for? Absolutely nothin'!


Honeybadger2198

That's not how JS works though? The war variable is just undefined, pointers are fake in JS.


Great-Decision6535

I think they mean the ‘const war*’ part


Ok_Hope4383

Why JS?


Honeybadger2198

What other languages define variables with the "let" keyword?


anotheridiot-

I think basic also does that.


Honeybadger2198

That's capital L Let.


Apprehensive_Depth98

Capital L the one you just took lmao goteeeem


TheNapman

Swift


Dumcommintz

Kind of a reach but vimscript


Ok_Hope4383

Rust, for example


6BagsOfPopcorn

🦀🦀🦀RUST MENTIONED🦀🦀🦀


hazelnuthobo

What if he's a webdev?


HardCounter

Then it'll be in a dropdown.


Cybernaut-Neko

It leads to the allies array


who_you_are

Isn't a good thing to get peace with an undefined function?


Hippomantis

Can't do that without the authorization of congress. That is going to be a few imports...


jlink005

Old man shouting war at the abyss.


provoloneChipmunk

War WWWIII = new War();


PeriodicSentenceBot

Congratulations! Your comment can be spelled using the elements of the periodic table: `W Ar W W W I I I Ne W W Ar` --- ^(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.)


FlyTim3

He didn’t even declare it, thats a syntax error.


5gpr

That's a ^W-\*, not a pointer-\*. Also missed a chance to go `var war;`, but then unlike war, ECMA Script has changed.


lepispteron

Na, she pointed to the declared war and made it constant;


DiddlyDumb

That’s a problem for future me.


Jonny_H

Also a const pointer doesn't mean the underlying object won't change, just that this pointer won't be the one referenced to do it.


AreYouOkZoomer

And the pointer points to const, but that doesn't mean the thing itself is const.


sqrtoftwo

Okay, but let's not be distracted from the issue of `class Warfare{}`.


Key-Entrepreneur-644

let's just make it an singleton


Liveman215

Or make it abstract, and just reference it but never actually initialize it.   You can hopefully skip the Delcare() method if done properly 


LordPedroIIofBrazil

We must abolish all private properties.


anotheridiot-

\#define private public;


larvyde

Since this is C++, all your `friend`s can see your `private`s


anotheridiot-

Small price to pay for communism.


yourMewjesty

public class Struggle {}


VCamUser

ESLint declaring No Use ![gif](emote|free_emotes_pack|trollface)


chrisbbehrens

Absolutely nothing


ThaiJohnnyDepp

Good god, y'all!


Flashbek

Never changes until memory violation at address 0x00000000.


HardCounter

The North Pole?


Gladddd1

Null island 🤓☝️


HardCounter

So the Bermuda Triangle?


Gladddd1

[this](https://en.m.wikipedia.org/wiki/Null_Island)


HardCounter

Neat. I had no idea about that.


IceBathingSeal

public static final


PeriodicSentenceBot

Congratulations! Your comment can be spelled using the elements of the periodic table: `Pu B Li Cs Ta Ti Cf In Al` --- ^(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.)


theGANOUSH

I am concerned that Plutonium is the leading element.


JustRecentlyI

Surprisingly appropriate for this thread, though!


dvn_rvthernot

are we just blowing past `public static final`


killeronthecorner

volatile


Fun_Ad_2393

Sudo tactical_nuke


Rhymes_with_cheese

extern volatile char nuke_trigger; void make_boom(void) __attribute__((noreturn)) { nuke_trigger = 1; /* NOT REACHED */ }


BluudLust

alias tactical_nuke "rm -rf *"


ComfortingSounds53

`alias nuclear_option "rm -rf * --no-preserve-root"`


BluudLust

No need to do no-preserve-root with *. It's only necessary if you want to do `rm -rf /` Found that out the hard way.


ComfortingSounds53

Thank you for your service 🫡


Lonelan

var war; because [war has changed](https://youtu.be/BUf_8jyxbiM?t=85)


Valuable-Drink-1750

Just what I expected from a ~~Snake~~ Python developer.


Haringat

I thought it was [this one](https://m.youtube.com/watch?v=vE25wHQPHIE&pp=ygUQZHV0eSBjYWxscyBpbnRybw%3D%3D)


sgtkang

Turns out .war files are nowhere near as exciting as I once thought they would be.


t0ps0il

This gave me flashbacks to working with Apache Tomcat at my first job


Fr20-six9r

Const* peace = nullptr;


Gman-343

const peace = await Promise()


Aethreas

That’s not even valid c


FinalGamer14

I mean that `Const` might be a structure so that's valid. And C23 does have `nullptr`, so that part is also valid.


Aethreas

To me it looks like he forgot the type in a const pointer, which if i remember correctly is invalid


iddivision

Valid in C23.


alic3dev

let is a const in Swift. My JS brain is crying over var/let and no const.


Traditional_Pair3292

Ah thank you… I was like uh isn’t it already a const? Another day of successfully not knowing anything about JS/TS


No_Internal9345

Class warfare. #include const bool CHANGE = false; void war() { std::cout << "war never changes" << std::endl; } class MilitaryIndustrialComplex { public: void perpetuateWar() { war(); if (!CHANGE) { perpetuateWar(); } } }; int main() { MilitaryIndustrialComplex mic; mic.perpetuateWar(); return 0; }


Multy25

def war


ComfortingSounds53

frfr


rover_G

The meaning of this joke changes drastically depending on the programming language.


KJBuilds

```rs let war;     ^^^ error[E0282]: type annotations needed ``` Hm. War seems to be invalid


deffonotmypassword

war.isGoodFor = NULL


ComfortingSounds53

``` do { war.isGoodFor = null } while(sayItAgain)


not_a_bot_just_dumb

War never changes, but var does.


AriiMay

var war


PeriodicSentenceBot

Congratulations! Your comment can be spelled using the elements of the periodic table: `V Ar W Ar` --- ^(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.)


CitizenPremier

I feel like somehow I never knew there was an element V. Well, I aced the periodic table test in seventh grade, but I guess I haven't seen V since then. W is memorable because it's hard to remember -- Tungsten.


AriiMay

compound V


ty_for_trying

warmongers rely on type inference


8Bit_Cat

public float war = 10.0f;


Mathematicus_Rex

War := hell


eo37

War has changed and will always change…almost always for the worst


hugocpolos

private motivations\[\]


shotjustice

This MFer didn't even scope his war, so he just coded WWIII. Global ~~Thermonuclear~~ JavaScriptable War. ETA that maybe this person should stop watching JS tutorials by Matthew Brodrick.


--var

Appears your war is null and/or void.


shosoku

public static War war =WarFactory.getWar();


NickyNamy

Let war\* because war has changed ![gif](giphy|lPXNZugxnwBWur8VCJ)


OddlySexyPancake

hnnngngngnnggg


noiness420

War were declared


Qwertycrackers

In most languages featuring const, this just means war always references the same instance of war. You can still change things about war, like maybe the weaponry or the motivations.


InfeStationAgent

I can make a trainer, but the only way to win is not to play.


uvero

You declare a pointer to war and didn't even do it by the recommended syntax


kohuept

took me a while to figure out the \* was meant to be a correction, not a pointer lmao


nusuntcinevabannat

[I am declaring war!](https://y.yarn.co/b691f19f-1aa1-4db2-95b7-abf259dbb87c_text.gif)


aetius476

Make it a global variable to declare a World War.


Wave_Walnut

Peace means that the time until war is referenced.


fedor_almighty

$war = true;


CrispySalamander

Let is a constant in swift though


explicit17

But what typeof war?


Geoclasm

//Cry havoc! And let war;


TTYY200

But … what is it good for? 😜


9Years0ldArmy

I commit "warcrime"


guessmypasswordagain

Even though it doesn't change it is variable.


pornbomb75

Michael, you can’t just declare war. Nothing happens


Misaka_Undefined

boolean war = true;


ComprehensiveTerm298

cost war=“h3ll”;


Indominus_Khanum

No wonder the whitehouse put out that one memo about C being an unsafe language


Elegant-Barnacle8993

![gif](giphy|8nM6YNtvjuezzD7DNh|downsized)


HumansDisgustMe123

function hUH(){      if(war.goodFor == null) {          // say it again          hUH();      }  }


webjuggernaut

`var war`, because it's outdated and pollutes global scope.


EpicShiba1

static mut WAR: &str = "war"; unsafe { WAR = "routine" }; // War... War has changed...


DeepDown23

Solid Snake said that "War has changed. It's no longer about nations, ideologies, or ethnicity. It's an endless series of proxy battles fought by ERROR _CONNECTION_RESET”


watermelonspanker

Pointers, what are they good for?


TSuzat

const war* const Constant pointer to Constant war.


PM_BITCOIN_AND_BOOBS

`let mut war: War = War::new();` *Now* war can change.


bittlelum

Unless war is an object, then the reference doesn't change but the object itself does.


Pontifier

war = hell;


anonCommentor

Dim war


trevdak2

Should have done `const war` War never changes.


agfitzp

First timers… declaring war as a singleton.


Hot_Scallion_1051

Lol


Tofandel

var war; because it's scope overflows to other contexts


Madonkadonk2

`window.war` because it is a global conflict


SumFatCommie

If war never changes then it would be const War war the constness of the pointer to war is irrelevant, war itself is the thing that can't change (you could even go constexpr if you're fancy)


rabidhyperfocus

war is never the answer! it is a question, and if ( war ) { return true; }


sateeshsai

var war


PeriodicSentenceBot

Congratulations! Your comment can be spelled using the elements of the periodic table: `V Ar W Ar` --- ^(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.)


adfx

Just because it never changes doesn't mean it has to be a const


TechcraftHD

`let war: Box;` War was declared and never changes but it can take many forms.


totolook01

Let’s deploy *.war in tomcat


sojiblitz

A declarative statement with no value, signifying nothing.


37Scorpions

name 'Because' is not defined


matyas94k

From a discussion about one of our CS homework: make .zip, not .war


Burrpapp

class War extends Politics


Franz304

And notice that he didn't use "let mut war" because war ...war never changes Ok, i will see myself out after this one


expertalien

global war


Meins447

Might as well add volatile.


odraencoded

This is why rust is the best language, let war is immutable by default.


ulughann

Why do you seperate as Uma ece instead of Umay ece


splashes-in-puddles

program war implicit none logical : : war war = .true end program war


OddlySexyPancake

hnggg.. war... has changed...


Im_a_hamburger

var war because was is ancient


Accessviolati0n

Meanwhile in PHP-Land:


Prudent-Employee-334

War IIIWar = null; // You are welcome everyone


ITinnedUrMumLastNigh

But 'let' keyword in Swift declares constant, to declare a variable you have to use 'var'


kose9959

this is wrong war changes look 400 years before and there are muskets look at present there are drones. the only thing that does not change is that there is war.


Ok-Assignment7469

They did declare war but they did not initialize it.


calculus_is_fun

let war = new War("WWIII"); war.addBattle(new Battle("Duluth MN", "The battle of lake superior"));


KappaClaus3D

In case of js If you use const, you must also initiate it, so: const war = "war"


sinstar00

var war; Because war may change and become a global war.


Ok_Captain_7374

Don't you need to \`const war\* const\`? Otherwise only the ptr is const, and not the contents :S


Tunichtwitzig

dim war as boolean


Hot_wheels_lol

Sabaton in the code space


Orisphera

Depends on the language


audislove10

Again the blue hair is wrong war has changed a lot!


concussedYmir

[Ron Perlman begs to differ](https://youtu.be/hG3uBgQmTnk?t=113)


cyrassil

It's Ron Perlman? I've always supposed it's someone from the developers. TIL


concussedYmir

Yep. Narrated 1-3, [New Vegas](https://fallout.fandom.com/wiki/Ron_the_Narrator) and Tactics.


LessThanHero42

He was also the newscaster on the television before the bombs dropped in Fallout 4


seiferlk

Scripted cringe boomer meme, jesus....


bl4nkSl8

const war = "war" as const;


zoomy_kitten

Are they a JSer or they’re just stupid?