6 ms·
> why would a C++ successor language use `fn main()` instead of using C/C++ style `int main()` Apparently easier and faster parsing. Most modern language have
by flohofwoe 2mo ago
> why would a C++ successor language use `fn main()` instead of using C/C++ style `int main()`
Apparently easier and faster parsing. Most modern language have arrived at the `fn bla(arg: ArgType): ResultType` form and I don't think they made that decision for purely aesthetical reasons.
- vintagedave 2mo agoEven C++ has. https://www.geeksforgeeks.org/cpp/trailing-return-type-in-cpp-11/ https://www.geeksforgeeks.org/cpp/trailing-return-type-in-cp...
- lelanthran 2mo ago> Most modern language have arrived at the `fn bla(arg: ArgType): ResultType` form and I don't think they made that decision for purely aesthetical reasons. Not just modern, it's older than you think. Pascal function definition is `function bla(arg: ArgType): ResultType;`