N
N
Nicknu2017-06-20 14:12:13
C++ / C#
Nicknu, 2017-06-20 14:12:13

How are libraries written for C++ and other PLs?

What are they written on? Imagine that a standard person is not enough or he is too lazy to poke around in the documentation, and pride does not allow him to search / download ready-made libraries, what then, into assembler - and forward?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mercury13, 2017-06-20
@Mercury13

In 99.9% of cases - in high-level languages. As a lower level layer, three things are used.
1. Standard language library.
2. OS internal API (WinAPI/POSIX/DOS).
3. Alien low-level libraries.
There is such a thing as "Turing completeness" - roughly speaking, this means that the language is able to solve the same problems as a Turing machine (a simple hypothetical programmable device). All programming languages ​​are Turing complete, that is, they can encode any algorithm, why assembler?
Assembler is used to a limited extent in inner loops where speed is important.
Here, “low level” means “little automation”, “a very thin layer between the operating system API and our new interface”, “minimum memory management” - that is, the function, for example, takes not std:: string, but a pointer to null terminated string const char*. And for writing libraries, they like languages ​​that can work at a low level - primarily C, C++ and Pascal. If there is no speed limit, assembler is optional.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question