Categories
- Art (356)
- Other (3,632)
- Philosophy (2,814)
- Psychology (4,018)
- Society (1,010)
Recent Questions
- Why did everyone start to hate the Russians if the U.S. did the same thing in Afghanistan, Iraq?
- What needs to be corrected in the management of Russia first?
- Why did Blaise Pascal become a religious man at the end of his life?
- How do I know if a guy likes you?
- When they say "one generation", how many do they mean?
The term “Programming Philosophy” was used only in Russian translations to Western publications. For example, “Thinking in Java” was just translated as “Java Philosophy”.
It makes sense to talk not about the philosophies of programming languages, but about different programming paradigms. Some languages tend to stick to one paradigm, while others tend to stick to another. �Many languages are multi-paradigm. A paradigm defines how abstractions and actions on them are expressed in code.
In general, there are many classifications here. For example, you can divide it like this: imperative / functional / logical / …
In imperative programming ,a program is a sequence of instructions that are executed in order and can read and write data from memory, changing its state.
In functional programming, a program is a combination of function calls in the mathematical sense. Unlike the imperative approach, there is no state other than the result of the function calculation.
Within the imperative approach, you can distinguish between procedural and object-oriented programming.
In procedure mode, a program looks like a sequence of calls to procedures that manipulate data stored in structures.�
In the OOP approach, a class entity appears that stores state internally and defines operations (methods) that allow you to access and change this state. An OOP-style program is a collection of class method calls.
You need to understand that no one, for example, prevents you from writing in C++, even in a procedural, even in OOP, even in a functional style.�
I have mentioned only what I often encounter in practice, and I do not pretend to complete the answer. For more information, please refer to wikipedia�
https://ru.wikipedia.org/wiki/%D0%9F%D0%B0%D1%80%D0%B0%D0%B4%D0%B8%D0%B3%D0%BC%D0%B0_%D0%BF%D1%80%D0%BE%D0%B3%D1%80%D0%B0%D0%BC%D0%BC%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%B8%D1%8F
Programming languages often do have their own philosophy. This is the formula that guided the creator of the programming language. Some of the languages that have evolved don't have that formula.
Perl — “There's always more than one way to do it” (There's more than one way to do it). Pearl is known for a huge number of expressive means, and the same program can be written in a thousand different ways, in different styles.
Python — Explicit is better than implicit, simple is better than complex, Complex is better than confusing (Explicit is better than implicit, Simple is better than complex, Complex is better than complicated) — this is a quote from Zen of Python, which is printed with the “import this” command. The language fully follows these principles.
PHP-this language doesn't really have any formula, but the words of its creator best illustrate its spirit: “Real programmers will say that memory is leaking everywhere and it needs to be fixed. And I'll just restart the server every 10 requests. ” (The real programmers will say “Yeah it works but you're leaking memory everywhere. Perhaps we should fix that.” I’ll just restart Apache every 10 requests)
“C is a razor-sharp tool: you can use it to create both an elegant program and a bloody mess” (Brian Kernighan). Very accurately conveys the philosophy of the language. Full control over what is happening, you can do whatever you want, and errors will completely break the program.
Of course, there are many more languages, but not every language can be described with a single succinct label formula.
In the question it is written briefly, but here they scribbled whole sheets. I'll answer for a few languages that I know.
Python. Python (python) has its own official philosophy. In short:
1. It is better to write more, but that it would look (and work) well and clearly
2. Explicit is better than implicit
And all that sort of thing.
But in JavaScript, everything is radically different. Due to the specifics of the domain and the development of the language, JavaScript's philosophy sounds something like this:
As long as it works. It doesn't matter how.