| ▲ | maybewhenthesun 4 days ago | |
I see 'fn void main()'. There's probably a good reasson but why the 'fn'? It doesn't really add anything because 'void main()' already communicates it's a function. The main draw of C (to me) is it's terseness and it's avoidance of 'filler' syntax words. I admit I didn't (yet) look much further into it, but this first thing jumped out to me and slightly diminished my desire to look further into C3... | ||
| ▲ | chippiewill 4 days ago | parent | next [-] | |
It's to remove a syntax ambiguity with c-style function declarations https://en.wikipedia.org/wiki/Most_vexing_parse The syntax ambiguity adds a lot of complexity to the grammar that makes parsing a lot more complicated than it needs to be. Sticking `fn` in front fixes a lot of problems. | ||
| ▲ | cardanome 4 days ago | parent | prev [-] | |
https://c3.handmade.network/blog/p/8886-why_does_c3_use_%252... | ||