Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-4041-

What C does /prog/ prefer?

Name: Anonymous 2010-08-28 19:43

[ ] K&R C
[ ] C89
[ ] C99
[ ] C1x

Name: Anonymous 2010-08-28 19:47

Gnu C

Name: Anonymous 2010-08-28 19:49

No C90?

Name: Anonymous 2010-08-28 20:30

C99 lol

Name: Anonymous 2010-08-28 20:49

C0x

Name: Anonymous 2010-08-28 21:53

>>5
I also prefer cocks.

Name: Anonymous 2010-08-28 21:59

BCPL is where it's at

Name: Anonymous 2010-08-28 23:24

C99, although I already am familiar with the stuff in C1x, as it's the same shit that's in C++0x (the atomics and unicode stuff).

Name: Anonymous 2010-08-29 0:20

C++

Name: Anonymous 2010-08-29 0:29

>>3
C89 and C90 are the exact same. C89 is the ANSI standard, C90 is the ISO standard.

Name: Anonymous 2010-08-29 0:48

C99 is best C

Name: Anonymous 2010-08-29 0:54

C99 is best C
C99 is just C++ features added to C
most C compilers dont fully support C99 and require compile flag to activate C99

Name: Anonymous 2010-08-29 0:58

>>12
I use POSIX compliant operating systems, which support C99.
http://www.opengroup.org/onlinepubs/000095399/utilities/c99.html

Name: Anonymous 2010-08-29 0:59

c99+posix+a few of the most common extensions.
planning on switching to c1x when it's finished.

Name: Anonymous 2010-08-29 1:48

>>12
GCC and Clang/LLVM both implement C99 fully. C99 is essential in modern POSIX systems.

Name: Anonymous 2010-08-29 2:02

>>15
Surely you jest!  http://gcc.gnu.org/c99status.html

Of course, the important stuff is there.  People care about "static inline", member/array initializers, "long long", and "restrict".  Nobody gives a damn about wchar_t unless they were duped into using it the first time around.

Name: Anonymous 2010-08-29 4:10

C1x
Thread local variables are handy and the _Atomic type qualifier might be useful too.

I'm all for standardizing (what are currently) compiler extensions to C - people probably won't abuse these features, it just avoids some platform specific code.

Name: Anonymous 2010-08-29 5:13

C89 with GNU extensions.

Out of the C99 add-ons I use only the long longs,  Sepples comments, macros of variable arity, and variable-length arrays, and I don't feel like using an incomplete language just to have these.

Name: Anonymous 2010-08-29 11:04

C99, because why would I want to declare my variables at the start of every scope?
Though lately I've been using cl.exe so I was restricted to whatever standard of C that uses.

Name: Anonymous 2010-08-29 11:05

C89 ||
C99 ||||
C1x ||

Name: Anonymous 2010-08-29 11:11

C89. Only Sepples programmers like C99.
There are ways C can be improved, but C99 doesn't.

Name: Anonymous 2010-08-29 11:12

>>19
C99, because why would I want to declare my variables at the start of every scope?
So you can keep better track of the stack, instead of littering your code with random variables like some PHP skiddy.

Name: Anonymous 2010-08-29 11:20

I use C89 because that's what Xarn uses. C99 introduces some changes that make my life easier and I'd hate that!

Name: Anonymous 2010-08-29 12:30

c99

Name: Anonymous 2010-08-29 13:14

c89

Name: Anonymous 2010-08-29 16:31

>>22
Because I use tens of random variables, right? You're a moron.

Name: Anonymous 2010-08-29 16:42

>>22
Enjoy your int i; for (i = 0; i != 100; ++i)

Name: Anonymous 2010-08-29 16:57

>>26
If you don't even use a lot of variables, why are you whining about where you have to declare them?

Name: Anonymous 2010-08-29 16:59

>>27
i != 100;
I don't think you're even a programmer!

Name: Anonymous 2010-08-29 17:05

>>29
Your homework for tonight is to compile it and write a one page essay on how the not-equals operator has increased staff synergy and leveraged industry best practices at software startups using Java and VB.NET.

Name: Anonymous 2010-08-29 17:22

>>27
That's why I have a bunch of global index variables in my void.h. (Currently i, j, k, and index).

Name: Anonymous 2010-08-29 17:45

>>31
Non-reentrant code? Shouldn't be a problem, right?

Name: Anonymous 2010-08-29 17:51

>>32
REENTER MY ANUS

Name: Anonymous 2010-08-29 17:56

>>33
That implies that someone entered your anus in the first place.

Name: Anonymous 2010-08-29 18:48

>>34
implying anyone on /prog/ still has an intact anus.

Name: Anonymous 2010-08-29 18:56

While we're on this topic, I kindly request the EXPERT C denizens of /prog/ to explain this bullshit[1]:
(double (^)(int , long long))foo
``cast foo into block(int, long long) returning double''

[1]: cdecl.org

Name: Anonymous 2010-08-29 19:26

>>36
Explain what bullshit? That's a perfectly cromulent expression1.

1. in certain non-standardized C-like languages

Name: Anonymous 2010-08-29 20:15

plus plus

Name: Anonymous 2010-08-29 20:50

>>28
I'm saying that I don't use a lot of random variables.

Name: Anonymous 2010-08-29 21:05

>>39
I don't use variables. I use constants and functions on them.

Name: Anonymous 2010-08-29 21:29

>>40
How do you deal with dynamic input, then?

inb4 Terribly!!

Name: Anonymous 2010-08-29 22:24

>>22 is right.

Name: Anonymous 2010-08-29 22:35

>>41
Text input is text, and numbers are numbers. Anything more complex than that is sent to a library.

Name: Anonymous 2010-08-30 9:25

>>43
Then how does the library deal with dynamic input?

Name: Anonymous 2010-08-30 10:50

C#

Name: Anonymous 2010-08-30 13:06

>>45
crappy proprietary language with platform lock-in is crappy

Name: Anonymous 2010-08-30 13:26

C99. The features I use over C89 are mixed declarations (and for loop declarations), inline, restrict, sepples comments, incomplete structs, and variadic macros.

Name: Anonymous 2010-08-30 13:27

>>47
Oh also, I use -Wc++-compat so it can be compiled as sepples on a certain compiler that doesn't support C99... :(

Name: Anonymous 2010-08-30 15:09

The only defensible aspect of C99 is the restrict keyword. I don't agree that it should be the programmer's job to micromanage compilers like that (and I'm violently opposed to the inline keyword), but having compilers figure this out automatically is equivalent to solving the halting problem.
Anyone who uses Sepples comments should be shot, by the way.

Name: Anonymous 2010-08-30 15:21

The only defensible aspect of C99 is the restrict keyword.
What's wrong with designated initializers, compound literals, and exact-width integer types?

Name: Anonymous 2010-08-30 15:27

>>49
Anyone who uses Sepples comments should be shot, by the way.
And why's that?

Name: Anonymous 2010-08-30 15:28

>>50
you forgot

for (int i = 0; ;)
    ;


just kidding. that is fucking disgusting.

Name: Anonymous 2010-08-30 15:31

>>52
Yeah, restricting scope to where a variable is actually being used sure is dumb.

Name: Anonymous 2010-08-30 15:34

>>50
designated initializers
If you're going to initialise something, initialise all of it. If you can't, it shouldn't be a single entity.

compound literals
They're less readable than doing the same thing with named functions or macros, because they overlap with existing syntax. They provide no benefit, they just make bad code cheaper.

exact-width integer types
POSIX already provided these.

Name: Anonymous 2010-08-30 15:44

If you're going to initialise something, initialise all of it. If you can't, it shouldn't be a single entity.
So you're saying
struct some_struct x;
x.a = &a;
x.b = NULL;
x.c = NULL;
x.d = NULL;

is better than
struct some_struct x = { .a = &a };
?

They're less readable than doing the same thing with named functions or macros, because they overlap with existing syntax.
Sure,
int a[] = { 1, 2, 3, 4, 5 };
/* 5 completely unrelated lines of code */
some_function(a);

is so much more readable than
some_function((int [5]){ 1, 2, 3, 4, 5 });

POSIX already provided these.
Not everyone wants all of POSIX, and exact-width integer types are very useful.

Name: Anonymous 2010-08-30 15:48

Answer the >>51‭, Xarn. And you you say something about Sepples comments being not portable and not supported in every compiler, I'm going to laugh.

Name: Anonymous 2010-08-30 15:52

>>53

#include <stdio.h>

int main(void) {
    {
        int i = 0;
        for (; i<10; ++i)
            puts("HAX MY ANUS");
    }
    return 0;
}


C doesn't need a shitty Java-like syntax-extension to do this.
your argument is invalid therefore, ``faggot''.

Name: Anonymous 2010-08-30 15:56

>>55
So you're saying
struct some_struct x;
x.a = &a;
x.b = NULL;
x.c = NULL;
x.d = NULL;
is better than
struct some_struct x = { .a = &a };
?

No, I'm saying both are signs of profound incompetence, and providing syntactic sugar to do it is retarded.

Sure,
int a[] = { 1, 2, 3, 4, 5 };
/* 5 completely unrelated lines of code */
some_function(a);
is so much more readable than
some_function((int [5]){ 1, 2, 3, 4, 5 });

You're an idiot who can't read.

Not everyone wants all of POSIX, and exact-width integer types are very useful.
Every single platform provides them already. I said POSIX because that's what every sensible person uses anyway. Nobody gives a fuck about Windows users, and Windows users don't use C.

And embedded programmers are a red herring. You aren't one and don't know any.

Name: Anonymous 2010-08-30 15:59

>>56
You know Xarn doesn't like Sepples comments, but you don't know why? How did you manage that?

Hint: it's about making newlines syntactically significant, idiot.

Name: Anonymous 2010-08-30 16:03

>>56
What Xarn actually said about C99 versus C89 is this:

C99 isn’t all bad, and some of the changes were long overdue, but given a choice, I slightly prefer C89.

Name: Anonymous 2010-08-30 16:20

>>55
struct some_struct x;
x.a = &a;
x.b = NULL;
x.c = NULL;
x.d = NULL;

Do you realize struct some_struct x = {&a, NULL, NULL, NULL}; is perfectly valid C89?

Name: Anonymous 2010-08-30 16:35

>>61
Yeah, until someone changes
struct some_struct { int *a, *b, *c; char * d; } to struct some_struct { char *d; int *a, *b, *c; }

Name: Anonymous 2010-08-30 16:45

>>62
And C99-style {.a = &a} breaks when someone changes the type of .a. What's your point? If you break things, things are going to break.
Really, they should break.

Name: Anonymous 2010-08-30 16:52

>>63
It's reasonable for things to break if you change the type. It's not reasonable for things to break just from changing the order.

Name: Anonymous 2010-08-30 16:57

>>64
Of course it fucking is. What the fuck is wrong with you?

Name: Anonymous 2010-08-30 17:16

The sooner C is replaced by C++/CLI, the better.

Name: Anonymous 2010-08-30 17:20

>>66
anyone using C99 might as well be using C++

Name: Anonymous 2010-08-30 17:21

>>65
He's used to Java.

>>64-chan, structs aren't dictionaries. It's not reasonable to expect them to behave as dictionaries. If you want that kind of behavior, stick to high-level languages.

Name: Anonymous 2010-08-30 17:32

>>59
Someone doesn't know about C's macro system.

Name: Anonymous 2010-08-30 17:34

>>67
Using C99 keeps the C++ programmers out, that's a big win to me.

Name: Anonymous 2010-08-30 17:34

>>67
Has anyone ever told you that you are not a very good troll? They probably didn't want to hurt your feelings, but someone really should have said something. The next time you see your friends, tell them it's not cool to let you continue to make a fool out of yourself.

Name: Anonymous 2010-08-30 17:53

>>69
Do we really have to have this discussion again? The C preprocessor and the C language are two different things.
And the argument you're about to try to make that a lot of compilers remove C language comments in the preprocessor rather than in the compilation stage is missing the point entirely.

Name: Anonymous 2010-08-30 20:42

>>72
The argument I'm about to make is that you're an ignorant buffoon who don't know what you're talking about, and that the distinction that you are trying to make is one which neither compiler writers nor users care one iota about, leaving you quite alone.

Name: Anonymous 2010-08-30 21:04

>>73
I'm not sure what you think ``ignorant'' means, but maybe you should look it up before you try to use it again.

Name: Anonymous 2010-08-30 21:14

Checking whether your C compiler can cast large floats to int32.
Checking whether your C compiler can cast negative float to unsigned.

Name: Anonymous 2010-08-30 21:49

>>74
What's the matter, too pleonastic for you? Then I shall strive to inform you of your incompetence more succinctly in the future.

Name: Anonymous 2010-08-30 22:36

>>76
``Pleonastic'' is another one you should look up.

Name: Anonymous 2010-08-31 5:00

>>74,77
Fuck off, Xarn. >>73‭-kun's use of §§ignorant'' was acceptable, if pleonastic.

Name: Anonymous 2011-03-21 13:25


Don't change these.
Name: Email:
Entire Thread Thread List