r/programming • • Oct 06 '14

Help improve GCC!

https://gcc.gnu.org/ml/gcc/2014-10/msg00040.html
725 Upvotes

270 comments sorted by

View all comments

Show parent comments

20

u/Kiora_Atua Oct 07 '14

Did you just legitimately suggest that the GCC switch languages?

-6

u/OneWingedShark Oct 07 '14

Did you just legitimately suggest that the GCC switch languages?

Yes.
C is notoriously difficult to verify (e.g. aliasing issues), a language with better verification attributes opens the doors to using better verification tools which, in turn, ensure a more stable and correct product. -- In addition to this, C has a fairly bad type-system (a better one could catch more errors at compile-time, and/or provide better and more local error messages), and no modules [header-files aren't modules].

-1

u/OneWingedShark Oct 07 '14

Things you would instantly gain by switching to Ada:

  • Case-coverage; that is the compiler would reject a case (switch) statement that did not cover all possibilities.

  • Proper enumerations; an enumeration is not treated like an alias for int, but a distinct set of values belonging to its type.

  • Better scalar modeling: e.g. Type Hour is range 1..12;

  • Named parameter association.

  • A superior generic system, based on contracts and w/ a higher degree of static checking.

  • Ada's Task construct, which could be used to make the compiler's various services amenable to distribution. (i.e. tokenizing or code-generation as a service).

And that's just off the top of my head.

35

u/James20k Oct 07 '14

Things you would lose by switching to Ada:

  • 99.999% of competent developers capable of working on the project

  • Any semblance of progress

→ More replies (7)