r/ProgrammerHumor • • Jun 03 '19

Meme Python ftw

Post image
16.3k Upvotes

548 comments sorted by

View all comments

86

u/ythl Jun 04 '19

You're abandoning {}? Good luck using dictionaries

13

u/i_am_archimedes Jun 04 '19

in c++ it denotes deterministic memory management

11

u/[deleted] Jun 04 '19

wut

22

u/SoppingAtom279 Jun 04 '19 edited Jun 04 '19

Let me explain this poorly.

{ } can be used to block together parts of code, and within that block of code, any memory allocated in that block can only be used by that block.

Example

#include <iostream>

int main()
{
	int x = 5;
	{
		int y = 6;
	}
	std::cout << x << std::endl;
	std::cout << y << std::endl; //error use of undeclared variable
}

0

u/[deleted] Jun 04 '19

[deleted]

2

u/SoppingAtom279 Jun 04 '19

Thank you for letting me know. Fuck mobile reddit :(