Re:Austral Programming Language
by hyperhello on Thursday July 27, 2023 @03:36PM
(#36898992)
I’d like it to just look exactly like C, but with new ideas in some incompatible syntax showing it is not part of C.
[ Parent
| on HN ]
Zig? Or Nim? Both of those are Algol-ish.
Ooh! What about [0]? Gambit Scheme has what they call `six-script` which is essentially a refactoring of Scheme grammar to fit into an Algol-esque syntax.
[0] http://gambitscheme.org/latest/manual/#GSI, see section 2.6.1
Re:Austral Programming Language
by hardwaregeek on Thursday July 27, 2023 @04:13PM
(#36899495)
Ehh C is a pretty miserable language to parse. No function definition keyword means you have to get pretty far to realize that you're parsing a function. Pointer syntax is ambiguous with expression grouping. And let's not even get started with the preprocessor. I'd say a good model for simple syntax is Go. Rust has a nice compromise of syntax too, but there are some awkward edge cases.
Shame they never fixed this. Would have been nothing to add a fn keyword at the beginning of all function definitions and then use the MS EEE strategy to bring it into the standard. Of the many changes the committee could make with C, I have to believe a function keyword would be among the least contentious.
Re:Austral Programming Language
by hardwaregeek on Thursday July 27, 2023 @07:11PM
(#36901314)
Probably couldn’t since people could have named functions “fn”. Although idk, one keyword breaking in 50 years is probably excusable
Re:Austral Programming Language
by lelanthran on Friday July 28, 2023 @08:15AM
(#36905747)
Well they didn't mind trampling all over symbols that start with 'str', which is bigger breakage in my opinion, so they could have added a function keyword.
Least, perhaps? But certainly contentious.
In my view, the job of the C committee should be to eliminate undefined behaviour and any remaining specification ambiguities (or errors) and otherwise leave the damned language alone.
If you want a new language every 3 years, you can always use C++.