What projects cannot be completed in C?

I would like to know which projects cannot be completed in C.

I know that programming can be faster and more intuitive in other languages. But I would like to know what features are missing in C, which will prevent the project from completing well.

For example, C has very few web frameworks.

+6
c
source share
9 answers

C, like many other languages, Turing Complete .

So the simple answer is: none.

However, meta-programming of C ++ templates meets the same criteria, so "maybe" is not a good criterion for choosing tools.

+29
source share

The very first C compiler?

+19
source share

Working solution to the problem

+10
source share

Well, here's one: you cannot write the x86 boot sector to C. This is one of those things that needs to be written to ASM.

+4
source share

Not.

Different languages ​​give you different ways to say things. For some classes of problems, this language may be more expressive and / or concise. Are there any projects that you should choose something aside from C? Oh sure. But to say that you cannot do it well in C is misleading. It would be better to ask which language is the best choice for this problem, and is there any point in using something unfamiliar?

+2
source share

Everything can be done in almost any language.

However, there is a level of practicality. As the complexity of your system increases, you need the best tools to manage it.

The problems are still solvable, but you need more people and much more design effort. I am not saying that other languages ​​do not use design; I am saying that the same level and attention to detail may not be required.

Since we programmers are Human (I, at least), we have problems in one area or another. My biggest memory. If I can visualize my code as objects, managing large modules in my head becomes easier and my brain can handle larger projects.

Of course, even in C you can write good OO code, templates were developed in C by manually managing the dispatch tables (pointer tables with some pointers updated to indicate different methods), and this applies to all programming builds from higher languages ​​- they can be made in any language, but ...

If you were to implement objects in C, each individual class that you wrote would have a large amount of service labels. If you did some form of exception handling, you would expose more patterns.

Higher-level languages ​​abstract this template from your code and in the system, simplifying what you need to think about and debug (the distribution table in C can take a lot of debugging, but in C ++ it will not fail because the code generated by the worker by the compiler, it will be error-free and hidden, you will never see it).

I think I would say that the biggest difference (only?) Between low-level and higher-level languages ​​is how much you hide the template. In the last series of dynamic languages, they really hide the contours of the loop inside the language, so it looks more and more like this:

directory.forEachFile (print file.name); // Not Some Real Language

In C, even if you highlighted part of the loop inside a function, setting pointers to functions and stuff will still have lines of non-obvious code that won't solve part of your main problem.

+2
source share

There is more than one algorithm that cannot be written with C.

0
source share

Depending on how much you want to invest (time / money / energy) to make this happen. Otherwise, I would say that they are not. Sometimes it’s easier to use something else.

0
source share

The kernel of the OS is written in C, and everything works on it, so you can write everything in C.

The boot sector that needs ASM :-), I don’t think you meant it.

0
source share

All Articles