forgot a semicolon

> forgot a semicolon
> 9000 screens of template bullshit

Attached: 1200px-ISO_C++_Logo.svg.png (1200x1349, 69K)

Other urls found in this thread:

dlang.org/
twitter.com/NSFWRedditGif

That's how your mom feels about your DNA.

figured the wizards in charge of compiler design would have cleaned up template errors a bit by now

They have.
In C++20.

>make an error
>it doesn't work

ALERT THE ENGINEERS

Javascript doesn't have this problem

daily reminder that concepts are a bugfix, not a feature

use C
what is the appeal of templates anyway?
they slow down c++ code

Serious how do the compiler devs see this shit and think it's okay?

>what is the appeal of templates anyway?
Metaprogramming dumbshit. Enjoy your 20 page macros.

> no language except C++ has this problem

ftfy

if you are dumb yeah you may end up with 20 pages of macros or templates

It's literally real. I love C++ but they really have to do something about template errors, they're complete bullshit.
It gets better if you stop using STL and write your own, simple and minimal templates. However if you ever try to use the default std::string, vector, chrono etc. you're going to pull your hair out.
I'm afraid this is not correct. Been using the newest gcc with -std=c++2a and errors are still the same old bullshit.

Nobody said it was easy to be a good programmer.

Has anyone considered that this has been done intentionally? Reserve a specific language as a fallback? Think about it, how hard would it be to create or update the compiler/ide to give graceful error messages?

It would be absolutely genius but, I'll take off my tinfoil hat.

>tfw got a job doing primarily C++
>barely know any C++
>going to learn it in the 3 months before I start
feels good not being a brainlet.

depends on the job but in 3 months you won't be competent

You got a contract for a job that doesn't start for 3 months? That sounds sketchy.

Attached: real code.jpg (243x243, 16K)

It's a full time position at a real company for a real position. It's an actual engineering job so C++ is just a tool and not the job itself. It's just syntax.

> how hard would it be to create or update the compiler/ide to give graceful error messages?

Barely making a C++ compiler work at all is a major accomplishment. Making it show nice errors is pretty low on the priority list.

>forgot a semicolon
>even trying to compile without your IDE telling you that you already have an error

small time

> C++
> IDE

lmao

Every modern IDE and text editor statically checks for syntax even in templates.

>Monomorphization is slower than switches
what?

Anything lower then C++ doesn't, either.

Alright nano tard have fun with debugging... oh wait.

if you write good bugfree code you don't need a debugger

OP assblasted

Attached: 1534727096407.jpg (200x200, 59K)

debugging is good for just inspecting your execution so you dont have to write print statements everywhere

you don't write anything beyond fizzbuzzes and toy programs do you?

I fill my code with debug_printf

> Not knowing that you don't have to look at the template error insanity to find the error.
> Go to the first line of the error report and you'll most probably see the line reported as missing the semicolon

dlang.org/

This. Your compiler will highlight which line and which expression caused the instantiation failure. The rest of the error message just lists the templates that were instantiated to get here, like an exception stack trace.

For you.

C++ is unironically the white man language. It's immune to pajeet.

C++ IDEs are pointless garbage, because C++ is unparsable.

>templates slow down c++ code
How it feels to be a brainlet?

-fmax-errors=1 goes a long way. I will never understand why the compiler tries to understand the rest of the code after the first error. The first error can derail the parsing of the rest substantially.

>It's an actual engineering job so C++ is just a tool and not the job itself. It's just syntax.
Guaranteed spaghetti code.

Well, that's why decent IDEs use the compiler for parsing.

fpbp

#include

template
void print(T toprint)
{
std::cout temp;
print(temp)
}
}

Clang:
clang++ template.cpp -o template.out
template.cpp:15:20: error: expected ';' after expression
print(temp)
1 error generated.

GCC
g++ template.cpp -o template.out
template.cpp: In function ‘int main()’:
template.cpp:15:20: error: expected ‘;’ before ‘}’ token
print(temp)


Stop being retarded user. If you don't know how the language works, don't post about it.

Why isn't there an option in g++ to show errors in reverse order? That way you wouldn't have to scroll for an hour every time you have some minor fuckup on line 7 that caused a cascading failure.

>Been using the newest gcc with -std=c++2a and errors are still the same old bullshit.
Because it's C++2a not C++20, retard.
(C++20) Concepts aren't implemented yet.

Actually it's a feature because you can overload on them.

You were able to overload on SFINAE.

>so you dont have to write print statements everywhere
But print debugging is objectively the best method of debugging.

HAAHAHAHAHAHAHAHAHAHAHAAHAH

You are wrong.

>ITT, things that didn't happen.

Do you honestly believe that's what OP is referring to?

yo dawg
i heard u don't liek macros

Even with access to a debugger I still find writing print statements an easier way to understand what's going wrong.

Macros are fucking shit.
When C++20 introduces modules I'm finally have no reason to use the preprocessor.

or the compiler, it will become a scripting language

kys degenerate fag

do pajeets even do anything other then web/mobile dev?

You don't need an IDE to debug your programs, pajeet. It's called gdb. Nobody uses nano, it's always either vim or emacs.

from what I can tell
>edgy kids do c++
>pajeets do android/java/c#
>wanna be kids do C
>academicians do rust/haskell
>google shills do Go

Attached: d89.gif (600x580, 474K)

Except modules don't replace macros at all. Maybe you meant metaclasses? Even then you can't do pic related without copy/paste or macros.

Attached: Screen Shot 2018-11-23 at 12.37.04 PM.png (878x1552, 284K)

Whatever you're trying to do is not worth doing.

hello can you give me a source code, thanks in anticipation

yes c++ a shit, I agree

ive only used C, what does C++ give me other than oo?

Templates and compiletime evaluation.

a headache

If you can't quickly find a missing ; on your code, you're doing it wrong.

>obfuscating the hell out of everything and baby proofing things by introducing several layers of programming bureaucracy makes you a "big kid"
I guess C++ is for edgy teens with an over sized ego.

Jokes on her it's her fault for breeding me.
Soon I will end what should have never been started.

>write a template class that behaves like a numeric type is not worth it
this wouldn't be necessary if you could inherit from basic types

I wish delphi would come back to life

>Javascript doesn't have this problem
yeah, but the cure is worse than the disease

Free Pascal still exists and there's always Ada.

PHP also doesn't

>missing a semicolon is not error

based suicideanon