Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
akadajet
Sep 14, 2003

Ciaphas posted:

i refuse to learn about anything after c++98

last time I touched c++ it was with visual c++ 6

Adbot
ADBOT LOVES YOU

The Management
Jan 2, 2010

sup, bitch?

rotor posted:

people bitch about java being too wordy but goddamn

this example was very short. I felt bad that I was not able to come up with the kind of horrors that emerge from just regular C++

echinopsis
Apr 13, 2004

by Fluffdaddy
i use unreal blueprints which is basically just c++ and so can I just be real here for a second and say that c++ is easy as gently caress

git apologist
Jun 4, 2003

Sweevo posted:

this is what happens when you have a generation of programmers raised on javascript and p-lang toy bullshit

the macho programmer has logged on

Zlodo
Nov 25, 2006
yeah, i too prefer

unique_ptr< ComcreteFactoryAbstractRuleProviderStrategyImplContainer > thing = make_unique< ComcreteFactoryAbstractRuleProviderStrategyImplContainer >();

Over
auto thing = make_unique< ComcreteFactoryAbstractRuleProviderStrategyImplContainer >();

Verbosity and repetitions make the code so much clearer

Zlodo
Nov 25, 2006
typical review from guy who dislikes auto:

auto& thing = Blah::GetInstance().GetThing();
thing.Wank();

"Argh don't use auto we dont know what the type of thing is!!!"

Blah::GetInstance().GetThing().Wank();

"Ok :thumbsup:"

git apologist
Jun 4, 2003

Zlodo posted:

typical review from guy who dislikes auto:

auto& thing = Blah::GetInstance().GetThing();
thing.Wank();

"Argh don't use auto we dont know what the type of thing is!!!"

Blah::GetInstance().GetThing().Wank();

"Ok :thumbsup:"

but what sort of wank is it

and what if you were expecting a wank but we’re given a tug :ohdear:

Soricidus
Oct 21, 2010
freedom-hating statist shill

Zlodo posted:

typical review from guy who dislikes auto:

auto& thing = Blah::GetInstance().GetThing();
thing.Wank();

"Argh don't use auto we dont know what the type of thing is!!!"

Blah::GetInstance().GetThing().Wank();

"Ok :thumbsup:"

AnimeIsTrash
Jun 30, 2018

Zlodo posted:

yeah, i too prefer

unique_ptr< ComcreteFactoryAbstractRuleProviderStrategyImplContainer > thing = make_unique< ComcreteFactoryAbstractRuleProviderStrategyImplContainer >();

Over
auto thing = make_unique< ComcreteFactoryAbstractRuleProviderStrategyImplContainer >();

Verbosity and repetitions make the code so much clearer

Zlodo posted:

typical review from guy who dislikes auto:

auto& thing = Blah::GetInstance().GetThing();
thing.Wank();

"Argh don't use auto we dont know what the type of thing is!!!"

Blah::GetInstance().GetThing().Wank();

"Ok :thumbsup:"

let it out OP

akadajet
Sep 14, 2003

AnimeIsTrash posted:

let it out OP

I bet you also like hard tabs

qsvui
Aug 23, 2003
some crazy thing
auto is great if you don't want implicit conversions, which c++ allows way too much of

but ultimately the solution is:

Captain Foo posted:

you auto use a better language

Xarn
Jun 26, 2015
Do you also complain when people write std::string instead of std::basic_string<char, std::char_traits<char>, std::allocator<char>>?

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

Xarn posted:

Do you also complain when people write std::string instead of std::basic_string<char, std::char_traits<char>, std::allocator<char>>?

yep

echinopsis
Apr 13, 2004

by Fluffdaddy

Xarn posted:

Do you also complain when people write std::string instead of std::basic_string<char, std::char_traits<char>, std::allocator<char>>?

usually I let it slide

Deep Dish Fuckfest
Sep 6, 2006

Advanced
Computer Touching


Toilet Rascal
i just find some global variable with the type i need and use decltype() to create a new one with the same type

akadajet
Sep 14, 2003

Xarn posted:

Do you also complain when people write std::string instead of std::basic_string<char, std::char_traits<char>, std::allocator<char>>?

and people say javascript is bad

Xarn
Jun 26, 2015
It is

Deep Dish Fuckfest
Sep 6, 2006

Advanced
Computer Touching


Toilet Rascal
can we please not have this discussion again? all programming languages are bad because computers are bad and so is anything computer adjacent, computer touchers most of all

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

Deep Dish Fuckfest posted:

can we please not have this discussion again? all programming languages are bad because computers are bad and so is anything computer adjacent, computer touchers most of all

what about code red mtn dew? is that bad and or computer adjacemnt

Poopernickel
Oct 28, 2005

electricity bad
Fun Shoe

rotor posted:

i was like "the loving thing is all header files, where is the code??"

C++: the loving thing is all header files, where is the code??

Poopernickel
Oct 28, 2005

electricity bad
Fun Shoe
it's header files all the way down, my friend

this is why c++ compile times are poo poo and why g++ eats ram like it's adderall

Ciaphas
Nov 20, 2005

> BEWARE, COWARD :ovr:


whyyyy did i use std::pair instead of making a god damned struct with a constructor so the compiler would error or at least warn on this poo poo



:cripes:

Ciaphas
Nov 20, 2005

> BEWARE, COWARD :ovr:


i hate c++ now, as well as myself

echinopsis
Apr 13, 2004

by Fluffdaddy
i won’t lie, I do NOT understand any of that bullshit


code:
FOR i = 1 TO 10
PRINT “TURN ON YOUR MONITOR”
NEXT
this is all we ever needed

echinopsis
Apr 13, 2004

by Fluffdaddy

Ciaphas posted:

i hate c++ now, as well as myself

this is the way

Sweevo
Nov 8, 2007

i sometimes throw cables away

i mean straight into the bin without spending 10+ years in the box of might-come-in-handy-someday first

im a fucking monster

10 print "PENUS ";
20 goto 10

Ciaphas
Nov 20, 2005

> BEWARE, COWARD :ovr:


echinopsis posted:

i won’t lie, I do NOT understand any of that bullshit
find() was being called to look for default values instead of the values i wanted to look for

Poopernickel
Oct 28, 2005

electricity bad
Fun Shoe

Ciaphas posted:

whyyyy did i use std::pair instead of making a god damned struct with a constructor so the compiler would error or at least warn on this poo poo



:cripes:

move! Look up, devid

devid nooooo

Captain Foo
May 11, 2004

we vibin'
we slidin'
we breathin'
we dyin'

Sweevo posted:

10 print "PENUS ";
20 goto 10

cowboy beepboop
Feb 24, 2001

Ciaphas posted:

whyyyy did i use std::pair instead of making a god damned struct with a constructor so the compiler would error or at least warn on this poo poo



:cripes:

right click refactor easy peasy

Twerk from Home
Jan 17, 2009

This avatar brought to you by the 'save our dead gay forums' foundation.

Deep Dish Fuckfest posted:

no it doesn't and thank loving god for it. the compiler has to be able to figure out the type at compile time for it to work

we are, of course, talking about auto when used as placeholder for a local variable type here, because in true c++ fashion every keyword needs to have as many different meaning as possible in different context (though thankfully all of them still require the type to be deducible at compile time). we're not talking about auto used as, say, a function parameter type as is now allowed in c++20. possibly with concepts acting as constraints. or as part of decltype(auto) and its delightfully obvious meaning. or its effect of transforming a normal god-fearing r-value reference into a universal reference of loose morals when replacing a concrete type in a variable definition. or the type of firearm best suited to ending my suffering

This guy c++es

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe

Ciaphas posted:

whyyyy did i use std::pair instead of making a god damned struct with a constructor so the compiler would error or at least warn on this poo poo



:cripes:

yeah c++’s love of default initialization is a huge design mistake. it gets overlooked when people talk about default init because u.b. is an even more glaring problem but that’s fixable whereas the language not forcing you to use meaningful values is not

a simplified version of this (just with a local variable) was in my c++now talk a few weeks ago. i’ll steal this aggregate thing though for the next time i need to talk about it

Deep Dish Fuckfest
Sep 6, 2006

Advanced
Computer Touching


Toilet Rascal

Twerk from Home posted:

This guy c++es

no i'm just dangerously unhinged as evidenced by the fact that c++ is my favorite language

Ciaphas
Nov 20, 2005

> BEWARE, COWARD :ovr:


hell, same

i'm at least glad that my faux pas can be put to good use

AnimeIsTrash
Jun 30, 2018

Deep Dish Fuckfest posted:

no i'm just dangerously unhinged as evidenced by the fact that c++ is my favorite language

i dont get to do it that often but i really like coding in c++ too

Tunicate
May 15, 2012

fart simpson posted:

what about code red mtn dew? is that bad and or computer adjacemnt

All code is bad

Adbot
ADBOT LOVES YOU

tazjin
Jul 24, 2015


some time ago i memorised that type deduction guide for using visitors over variants. auto is cool!! :cheers:

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply