Tagged Questions
42
votes
4answers
15k views
Why do programming languages, especially C, use curly braces and not square ones? [closed]
The definition of "C-Style language" can practically be simplified down to "uses curly braces ({})." Why do we use that particular character (and why not something more reasonable, like [], which ...
4
votes
6answers
1k views
Is there a language that transcompiles to C with a better syntax? [closed]
CoffeeScript is a language with a very clean Ruby-like syntax that transcompiles to JavaScript. Does the same thing exists with C? Then writing more readable and as fast as original C programs would ...
12
votes
5answers
2k views
Why pointer symbol and multiplication sign are same in C/C++?
I am writing a limited C/C++ code parser. Now, multiplication and pointer signs give me really a tough time, as both are same. For example,
int main ()
{
int foo(X * p); // forward declaration
...
4
votes
5answers
1k views
Why was the C syntax for arrays, pointers, and functions designed this way?
After having seen (and asked!) so many questions similar to
What does int (*f)(int (*a)[5]) mean in C?
and even seeing that they'd made a program to help people understand the C syntax, I ...