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
Apocadall
Mar 25, 2010

Aren't you the guitarist for the feed dogs?

anything past that is for scrubs

bitbang or gtfo

Adbot
ADBOT LOVES YOU

RISCy Business
Jun 17, 2015

bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork
Fun Shoe
brainfuck op

The Management
Jan 2, 2010

sup, bitch?
C is the way and the light

Shaggar
Apr 26, 2006
c is only good if you add a # to it.

The Management
Jan 2, 2010

sup, bitch?

Shaggar posted:

c is only good if you add a # to it.

# is used in C to denote a preprocessor directive, so it is commonly used.

code:

#include <sa.h>

#if (YOS == POS)
#define ID 219
#endif

hth

big shtick energy
May 27, 2004


I am a C programmer and I dread my eventually replacement by kids writing JavaScript

akadajet
Sep 14, 2003

DuckConference posted:

I am a C programmer and I dread my eventually replacement by kids writing JavaScript

you can compile c to javascript now

The Management
Jan 2, 2010

sup, bitch?

DuckConference posted:

I am a C programmer and I dread my eventually replacement by kids writing JavaScript

don't worry, computers will be a million times more powerful so their JavaScript program will be about as fast as yours is

Bloody
Mar 3, 2013

c is a plague

Deep Dish Fuckfest
Sep 6, 2006

Advanced
Computer Touching


Toilet Rascal

Shaggar posted:

c is only good if you add a # to it.

just another heretical sect barely better than the average interpreted heathen

Asymmetric POSTer
Aug 17, 2005

bell labs was cool back in the day

echinopsis
Apr 13, 2004

by Fluffdaddy
i have used c when i programmed arduino poo poo and it was fine but also having object orientated poo poo i can't even imagine using c to do some things

Silver Alicorn
Mar 30, 2008

𝓪 𝓻𝓮𝓭 𝓹𝓪𝓷𝓭𝓪 𝓲𝓼 𝓪 𝓬𝓾𝓻𝓲𝓸𝓾𝓼 𝓼𝓸𝓻𝓽 𝓸𝓯 𝓬𝓻𝓮𝓪𝓽𝓾𝓻𝓮
I like C

big shtick energy
May 27, 2004


echinopsis posted:

i have used c when i programmed arduino poo poo and it was fine but also having object orientated poo poo i can't even imagine using c to do some things

you can make C that's kind of object-oriented if you want, structs full of function pointers everywhere. you can even inherit by casting a struct full of function pointers to another struct full of function pointers

don't ever do this. cumulatively it probably wasted a month of developer time

echinopsis
Apr 13, 2004

by Fluffdaddy
yeah that's what i wondered, shoehorning that poo poo in

Nanpa
Apr 24, 2007
Nap Ghost
i prefer c++ grandad

Phobeste
Apr 9, 2006

never, like, count out Touchdown Tom, man
I work at a place now that has all the worst decisions you could make in c. it's really good and I love it and I'm gonna fix all of it

Colonel Taint
Mar 14, 2004


DuckConference posted:

you can make C that's kind of object-oriented if you want, structs full of function pointers everywhere. you can even inherit by casting a struct full of function pointers to another struct full of function pointers

don't ever do this. cumulatively it probably wasted a month of developer time

This is basically how the linux kernel is written.

e: Except the casting part. Probably not the casting part. That sounds awful. It's bad enough just trying to find your way through function pointer soup, but I can at least see why it's necessary and useful. Inheritance in C the way you describe it sounds pretty awful

Colonel Taint fucked around with this message at 13:05 on May 2, 2017

The_Franz
Aug 8, 2003

Colonel Taint posted:

This is basically how the linux kernel is written.

e: Except the casting part. Probably not the casting part. That sounds awful. It's bad enough just trying to find your way through function pointer soup, but I can at least see why it's necessary and useful. Inheritance in C the way you describe it sounds pretty awful

this is how a lot of c software is written. for all of the "c++ is the devil" ranting some c developers do, they basically end up using the same patterns and manually implementing things c++ gives you for free

flakeloaf
Feb 26, 2003

Still better than android clock

our first year programming course was "c plus plus without the plus plus" because the OO portion was being taught by the smalltalk guy and our programming guy didn't see the need to do it twice

so yeah

Captain Foo
May 11, 2004

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

frankly i prefer D

The Management
Jan 2, 2010

sup, bitch?

DuckConference posted:

you can make C that's kind of object-oriented if you want, structs full of function pointers everywhere. you can even inherit by casting a struct full of function pointers to another struct full of function pointers

don't ever do this. cumulatively it probably wasted a month of developer time

you don't cast, you include the parent struct in the child. if you want to use the "super" you explicitly take a pointer to that member. this is easy to do and I'm not sure why it would waste more time than any other code.

The Management
Jan 2, 2010

sup, bitch?

Captain Foo posted:

frankly i prefer the D

Zlodo
Nov 25, 2006
wrong op
it's assembly

flakeloaf
Feb 26, 2003

Still better than android clock

MOV thread 25

Silver Alicorn
Mar 30, 2008

𝓪 𝓻𝓮𝓭 𝓹𝓪𝓷𝓭𝓪 𝓲𝓼 𝓪 𝓬𝓾𝓻𝓲𝓸𝓾𝓼 𝓼𝓸𝓻𝓽 𝓸𝓯 𝓬𝓻𝓮𝓪𝓽𝓾𝓻𝓮
assembly is cool but I hesitate to call it a "language"

Maximum Leader
Dec 5, 2014
asm was good enough for roller coaster tycoon and should be good enough for whatever idiot project you could dream up

New Zealand can eat me
Aug 29, 2008

:matters:


swift is pretty nice

My Linux Rig
Mar 27, 2010
Probation
Can't post for 6 years!

DuckConference posted:

I am a C programmer and I dread my eventually replacement by kids writing JavaScript

me too I have a Vizio TV that runs JavaScript apps

They aren't good

Captain Foo
May 11, 2004

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

flakeloaf posted:

MOV thread 25

mov u,gbs

Raere
Dec 13, 2007

i play with arduinos and i think c is pretty cool for constrained environments

Silver Alicorn
Mar 30, 2008

𝓪 𝓻𝓮𝓭 𝓹𝓪𝓷𝓭𝓪 𝓲𝓼 𝓪 𝓬𝓾𝓻𝓲𝓸𝓾𝓼 𝓼𝓸𝓻𝓽 𝓸𝓯 𝓬𝓻𝓮𝓪𝓽𝓾𝓻𝓮
I was programming C on the game boy a little while ago

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug
C is easy to make errors with
lots of C exists with errors in it
lots of money is spent to fix these errors
i get some of that money

keep using C

champagne posting
Apr 5, 2006

YOU ARE A BRAIN
IN A BUNKER

Raere posted:

i play with arduinos and i think c is pretty cool for constrained environments

:yossame:

if an arduino was available but with python instead of c I'd be happy

Bloody
Mar 3, 2013

c is actually very good for arduino-sized things

JewKiller 3000
Nov 28, 2006

by Lowtax
for me to poop on

BONGHITZ
Jan 1, 1970

more like p

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord
nah use C++ instead and pretend it's C for the most part

the best of the 2 worlds

The Management
Jan 2, 2010

sup, bitch?

Symbolic Butt posted:

nah use C++ instead and pretend it's C for the most part

the best of the 2 worlds

what do you mean I have to check the return value of new?

Adbot
ADBOT LOVES YOU

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord

The Management posted:

what do you mean I have to check the return value of new?

don't ever use new lol

  • Locked thread