Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

>So goto spaghetti is understandable?

There's no goto spaghetti in C -- it's only used for local error handling, not for jumping around, at least since the 70s...



You should look at some codebases I occasionally find on enterprise projects.


Enterprise projects written in C?

All 10 of them?


I wonder where you are counting those 10 from.

Enterprises also write native code, it is not everything Java, .NET and SAP stuff.


Sure, but most of it is in Java, .NET and such.

The rest of it could hide any number of dragons (and be written in any kind of legacy, nightmarish, and/or proprietary tools and languages), so it's not much of a proof of widespread bad C "goto" abuse.

Let's make a better criterion: how many of the top 200 C projects in GitHub suffer from "spaghetti goto" abuse? How many of all the C projects in GitHub?


Enterprise software is much more than just desktop CRUD applications.

For example, iOS applications, portable code between Android and iOS, distribution tracking, factory automation, life science devices, big data, graphics are all a small list of examples where C and C++ get used a lot.

Sometimes it says C++ on the tin, but when one opens it, it is actually the flavour I call "C with C++ compiler".

Github is not representative of enterprise code quality.


Your argument about enterprise code cannot be verified since we can't have access to it. Also, the sample of enterprise code you have access to is probably limited and thus most likely biased. Doesn't seem like a very good general argument, but maybe it is a good one for your own individual situation, if we are to believe your word.


You should say the same to coldtea, the person asserting that there are only 10 enterprise projects written in the C language and that there's no goto spaghetti in C language programs.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: