P
P
Pasha Andreev2015-05-23 12:58:39
Java
Pasha Andreev, 2015-05-23 12:58:39

What is the architecture of large applications in low-level languages?

What is the design of large applications written in C?
Coming from OOP languages ​​where I have classes, it's hard for me to understand how large C programs are developed.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
T
Timur Shemsedinov, 2015-05-23
@MarcusAurelius

OOP is not an architecture, but a paradigm. Most likely you wanted to ask what are the design patterns in the procedural and structured programming paradigms. I will briefly list: modules (structural blocks, libraries, often built into a hierarchical system using dependency injection), interfaces (sets of exported functions that are visible outside the module), templates (functions abstracted from data types, with the help of which the generic programming paradigm allows you to generate typed implementations), layers(oddly enough, but before OOP there were also abstractions, they were implemented using the principle of dividing modules into layers, i.e. groups of modules that implement lower-level or higher-level tasks, programming usually starts from the highest layer of abstractions, from which you can use only calls to 1 layer below, but not 2 layers, i.e. you can’t mix abstractions and skip layers, roughly speaking, from pressing a button directly to a cluster on disk), stubs(You should be aware that these are functions and modules without implementation, necessary to run and debug a program that has not yet been written, they can display calls to them on the screen or in logs, and consist only of returning plausible but not real data). There are also many patterns of data structures that also greatly simplify life if you choose a specific implementation for your project and adhere to the principle of data structure homogeneity, for example, do not use two different implementations of doubly linked lists in one program (or module). Data structures completely replace objects, moreover, they work incomparably faster, do not create problems of modeling ambiguity, as in OOP, for example, when you cannot decide where the " ass" method should be, at the "chair" or at their common container "world" in which it happens. Common data structures: set of fields, list (including singly-linked, doubly-linked, cyclic, etc.), stack, tree (can also be from singly-linked to five-linked with variations), set, queue, associative array and hash table. That's it, I'm tired of writing, I recommend reading Dijkstra, Wirth, Knut. And an amusing article in the style of a holivar srach can help to come to terms with the lack of OOP: blogerator.ru/page/oop_why-objects-have-failed

J
jcmvbkbc, 2015-05-23
@jcmvbkbc

Yes, just like in C++. Instead of classes, data structures. Instead of interfaces, there are structures with pointers to functions. Macros instead of templates. Inheritance -- structures containing structure fields.

U
uvelichitel, 2015-05-23
@uvelichitel

Read the header .h files of well-structured opensource projects. I am studying on Plan9.

E
Eddy_Em, 2015-05-25
@Eddy_Em

Why did C become a low-level language?
And the architecture is simple: we divide by files so that each file takes no more than a couple of thousand lines (otherwise it is inconvenient to read).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question