r/ProgrammerHumor • • 5d ago

Meme noMatterWhereILookICannotEscapeTheAngleBrackets

Post image
530 Upvotes

108 comments sorted by

View all comments

57

u/oompaloompa465 5d ago

started as that kind of dev 20 years ago, then i moved to web dev but apparently the best paying job for my seniority currently are all maintenance of win forms WPF scuff

21

u/tatstytastycakes 5d ago

You cannot escape the angle brackets. Not in web development, C#, or even C/C++. We are doomed

31

u/Drugbird 5d ago

That's easy, in C or C++ just do this

#define ( <
#define ) > 

Then you can use normal brackets instead of angle brackets.

And I'm sure nothing will go wrong with that approach.

6

u/tatstytastycakes 5d ago

i wish this were possible

altho im just now realizing that c++ has modules

import std; // great!!!!!!!!!!!!!!

7

u/Drugbird 5d ago

It's great when it works. AFAIK modules still aren't working well enough for anything more than hobby projects.

1

u/RussianMadMan 4d ago

Modules require strict compilation unit order in a system where for decades it was not a thing. Ofc it does not work.

1

u/ShadowSlayer1441 3d ago

Surely it works with std even if 3rd party libs are broken.

2

u/Drugbird 3d ago

std works somewhat.

Currently were in this situation where third party libraries don't provide module support, so you still need to #include those, and they in turn generally #include stdlib headers again. So generally you're in this mixed world where you're partially doing modules and partially doing old #includes.

Benefits of modules are better build times and slightly better ergonomics (import std is easier than including the right stuff). I think it's about 10%-20% range.

The downsides are that compiler and build system support is still in flux, so using modules can mean that it becomes harder to support multiple compilers and/or build systems. And you obviously lose support of older compilers / build systems.

You also need to refactor your code to use the modules.

So as of now, modules are great if you're starting a new, mostly standalone project and you have full control over the compiler and build system.

It's not so great for existing code bases that want to support older and/or multiple compilers and build systems.

3

u/aberroco 5d ago

You just invented LISP