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

I like C but not its syntax

Name: Anonymous 2014-12-02 12:11

Why hasn't anyone made C that doesn't look like dogshit?

Name: Anonymous 2014-12-03 17:33

>>33
Okay, I see some sort of rationale behind C's syntax, but it still doesn't justify the choices made for C. For example, writing the function declaration like

int func_name(...);

would make sense in a pure language, where the expression func_name(...) may indeed be replaced by a value of type int. But it doesn't make sense in C because there are unrestricted implicit side effects everywhere, and a function call is not, as a rule, observationally equivalent to its return value.

Same goes for the other arguments:

1) C wouldn't need a special syntax for function types because it doesn't have function types. It forces you to use (void *) for all function types.

2) C already has special syntax for pointer types, e.g.

[code]typedef int* IntPtr ;

3) C already has an infernally complex grammar. If simplicity was wanted, why not use s-exps? They're much simpler.

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