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.
 
  • Locked thread
indigi
Jul 20, 2004

how can we not talk about family
when family's all that we got?
the same thing everyone thinks of, making the cum happen


:synpa:

Adbot
ADBOT LOVES YOU

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord

echinopsis posted:

i made an arduino code but ive never objected it

I really don't think your arduinos code would benefit from making it more object oriented

like if you're coding and you're naturally thinking of whatever you''re doing as "objects with methods and whatever" then go ahead and do it. If you're not then it's fine, your code is probably better this way and if it still feels iffy maybe you just need to break the code into smaller functions? my point is that you can't shove some bullshit class taxonomy over every problem, there's usually better ways to achieve encapsulation.


and c++ makes oop way harder and more frustrating than it needs to be

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord

hackbunny posted:

I've built a whole program with C++, AMA

how do you feel about C++ lambdas

jony ive aces
Jun 14, 2012

designer of the lomarf car


Buglord

ikanreed posted:

Microsoft Visual C++ 5.0 is so much more convenient than their Borland C++ competitors!
i don't think so tim

Baxate
Feb 1, 2011

c++ is in their weird place where its not as good as C for systems programming, and also not as good as c# for userspace programming

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av

Symbolic Butt posted:

how do you feel about C++ lambdas

hahahahaha I wish I could use C++11

I think they're cool, wish I had an excuse to learn them. template lambdas are even cooler and probably the closest C++ will ever get to AST manipulation

Deep Dish Fuckfest
Sep 6, 2006

Advanced
Computer Touching


Toilet Rascal
first time i've ever encountered a lambda in a c++ codebase was during debugging. someone was capturing a local stack variable reference and passing the lambda to be executed asynchronously on another thread :shepicide:

not really the best first impression

BONGHITZ
Jan 1, 1970

hackbunny posted:

hahahahaha I wish I could use C++11

I think they're cool, wish I had an excuse to learn them. template lambdas are even cooler and probably the closest C++ will ever get to AST manipulation

closest you'll ever get to rear end manipulation

echinopsis
Apr 13, 2004

by Fluffdaddy

Symbolic Butt posted:

I really don't think your arduinos code would benefit from making it more object oriented

like if you're coding and you're naturally thinking of whatever you''re doing as "objects with methods and whatever" then go ahead and do it. If you're not then it's fine, your code is probably better this way and if it still feels iffy maybe you just need to break the code into smaller functions? my point is that you can't shove some bullshit class taxonomy over every problem, there's usually better ways to achieve encapsulation.


and c++ makes oop way harder and more frustrating than it needs to be

no way in hell my arduino program needed objects! lol

my only experience with objects is in ue4 and they are fuckon indispensable I honesty don't know how people would get anything done without objects to be honest

Baxate
Feb 1, 2011

echinopsis posted:

no way in hell my arduino program needed objects! lol

my only experience with objects is in ue4 and they are fuckon indispensable I honesty don't know how people would get anything done without objects to be honest

code:
struct fart
{
    int volume;
    long smell;
}

void release_gas(struct fart);

BONGHITZ
Jan 1, 1970

just use void* arrays

Moo Cowabunga
Jun 15, 2009

[Office Worker.




Cat Face Joe posted:

ive never coded anything. I have nerds to do that for me

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord
ive never farmed anything. I have displeased moo cows to do that for me

Baxate
Feb 1, 2011

BONGHITZ posted:

just use void* arrays

this but unironically

Moo Cowabunga
Jun 15, 2009

[Office Worker.




Symbolic Butt posted:

ive never farmed anything. I have displeased moo cows to do that for me

I thought everyone farmed in your part of the world

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av

BONGHITZ posted:

just use void* arrays

lol I have an old project where I used STL containers with void * elements "because templates bloat code". it's actually really, really, really, really stupid. I was also using Borland C++Builder, which used STLPort, which internally already uses a generic non-template rbtree structure with void * keys/elements to implement map and set. lol, just lol

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord

Displeased Moo Cow posted:

I thought everyone farmed in your part of the world

HAH NO, brazil's rural population is 15%, less than USA's 19% and new zealand's... *puts glasses* 14%?!? whaaaaaaaaaaaaaaaaaat

Moo Cowabunga
Jun 15, 2009

[Office Worker.




suck on your Brazilian beef :chord:

echinopsis
Apr 13, 2004

by Fluffdaddy
symbolic, are you one of the reef jandal babes

echinopsis
Apr 13, 2004

by Fluffdaddy

Symbolic Butt posted:

HAH NO, brazil's rural population is 15%, less than USA's 19% and new zealand's... *puts glasses* 14%?!? whaaaaaaaaaaaaaaaaaat

we're just incredibly efficient at stripping our relatively Virgin land of everything good and wholesale and life giving

Moo Cowabunga
Jun 15, 2009

[Office Worker.




milk it, baby

jony neuemonic
Nov 13, 2009


heh.

BONGHITZ
Jan 1, 1970

cities have alot of people in them

echinopsis
Apr 13, 2004

by Fluffdaddy
I like to think so

cowboy beepboop
Feb 24, 2001

Symbolic Butt posted:

HAH NO, brazil's rural population is 15%, less than USA's 19% and new zealand's... *puts glasses* 14%?!? whaaaaaaaaaaaaaaaaaat

all anglo colonies, apart from the US, have this weird thing where we all live in a few mega cities instead of lots of medium cities idk why

c++ seems cool if you hate yourself

computer parts
Nov 18, 2010

PLEASE CLAP

my stepdads beer posted:

all anglo colonies, apart from the US, have this weird thing where we all live in a few mega cities instead of lots of medium cities idk why

it's pretty common in europe too

germany is the exception since they were a bunch of countries with their own major cities that then merged together

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...
i work on a large latency sensitive distributed system in c++, ask me things and i wont answer

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...
we all want things to be nice for us.

c++ is for the other times.

Feisty-Cadaver
Jun 1, 2000
The worms crawl in,
The worms crawl out.

Dessert Rose posted:

i work on a large latency sensitive distributed system in c++, ask me things and i wont answer

is it some sort of bullshit HFT financial garage xfer system that provides no value to anyone ever in the history of the universe but makes your bank millions of dollars a year?

k-zed
Dec 1, 2008

Fallen Rib

Feisty-Cadaver posted:

is it some sort of bullshit HFT financial garage xfer system that provides no value to anyone ever in the history of the universe but makes your bank millions of dollars a year?

i work on exactly that. all your pension money is ours

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...

Feisty-Cadaver posted:

is it some sort of bullshit HFT financial garage xfer system that provides no value to anyone ever in the history of the universe but makes your bank millions of dollars a year?

no it helps humans communicate with each other

KoRMaK
Jul 31, 2012



I tried to learn objective C and its just the worst.

I appreciate the premise of everthing being a message, but why do I have to pass all params as a hash AND in order?


Sandy Metz helped me realize how everything I did before ruby was a bastardized version of object oriented programming, it was more procedural programming with objects.

pram
Jun 10, 2001

Feisty-Cadaver posted:

is it some sort of bullshit HFT financial garage xfer system that provides no value to anyone ever in the history of the universe but makes your bank millions of dollars a year?

its skype or some other awful microsoft crap fyi

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?

Doc Block posted:

LOL if you only use c++ as c with objects

actually, LOL if you use c++

[ObjectiveC supremacy]

some of us were even using it before iPhone

or Mac OS X

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?

hackbunny posted:

I thought C++11 made it perfect but then C++14 made it somehow even better, and the upcoming C++17 is impossibly even better than C++14

so terrifyingly wrong

what's next, thinking Windows is a good OS with a nice API?

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?

Symbolic Butt posted:

how do you feel about C++ lambdas

a poor cousin to blocks (which are a C thing rather than just an ObjC thing)

in clang at least they're interoperable

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?

Ludwig van Halen posted:

c++ is in their weird place where its not as good as C for systems programming, and also not as good as c# for userspace programming

EC++ is actually good for systems programming though

it's C++ except without templates or exceptions, just the "C with objects" parts

that's what Darwin IOKit is built with, and it's damned useful, it was only a matter of creating a subclass in a few lines of code for me to write a display driver (for one example)

Doc Block
Apr 15, 2003
Fun Shoe

KoRMaK posted:

I tried to learn objective C and its just the worst.

I appreciate the premise of everthing being a message, but why do I have to pass all params as a hash AND in order?


Sandy Metz helped me realize how everything I did before ruby was a bastardized version of object oriented programming, it was more procedural programming with objects.

umm, name a c-derived language where you don't pass in the arguments in order?

I don't know what you mean by having to pass the arguments as a hash.

the argument names are part of the selector (aka the method name), so for:
[someObject pissOn:steve andThenShitOn:bill];
the actual method name is -pissOn:andThenShitOn:

Objective-C was heavily influenced by SmallTalk.

KoRMaK
Jul 31, 2012



With ruby (and any language that has hash like params) it doesn't have to be in order.

IT seems like obj-c forced you to used hashes, but they also had to be in order.


I didn't spend a lot of time with it, it seemed overly difficult. I might be missing something that makes it truely great

Adbot
ADBOT LOVES YOU

pram
Jun 10, 2001
ruby is poo poo

  • Locked thread