Java – mapping languages to examples

I recently read Eric Steven Raymond's article "how to become a hacker". I like his suggestion to learn five key languages (he suggests using python, C / C + +, lisp, Java and Perl) as a way to cover the main programming examples It's for today

His advice is that it doesn't matter which specific languages programmers know Understanding different programming methods is more important for two reasons

The first reason is that once you know the general way to solve the problem, it will make learning a new language insignificant

The second reason is that there is no best language - they all have trade - offs Considering a particular type of problem, it's best to know which language to choose This is what interests me most, but I have a question. He really distinguishes the five languages he suggests There seems to be a lot of overlap

So my specific question is, given these five languages, what are their expected programming examples, and give an example of the most suitable problem type

An example answer (I'm not sure if this answer is correct):

Perl
- mainly a functional language
- great for quick text substitutions in multiple files from the command line.

I found some other similar problems, but I want to know these five languages in particular I'm just looking for a starting point, not too detailed Thank you in advance!

Solution

I think you're wrong As eiser himself said, what matters is not language, but paradigm So when you say

You lack the point of a functional language, that is, they are very suitable for building large systems with a bottom-up approach: solving a pile of (carefully selected) small problems with well-designed functions until we have a complete system We reduce code duplication by identifying the common points of the algorithms we are using and encapsulating their commonalities with higher-order functions We minimize (obvious) branching behavior by using higher-order functions in order to contribute only to the functions we need in specific cases

Again, I can say so

But this ignores the OOP language's view of modeling concepts from the problem domain in code, so that we can force the problem at hand in a clear way We encapsulate code duplication by identifying the commonalities of related concepts, and encapsulate the code dealing with these commonalities in the class describing it We minimize (obvious) branching behavior by providing different subclasses of abstractions with appropriate different behaviors

In general, the fundamentals of programming languages and their related paradigms are

>Let you not consider anything that does not affect the quality of the final program If that's not (largely) ideal, then we all write machine code. > This is achieved by, among other things, providing a set of tools for building abstractions

Go around and pick one you like and are good at Just make sure you know when others will allow better solutions (which may mean that you will be good at them in the end) I think you can mainly take "good solution" to mean "clearly map code to ideas" The modulus of efficiency will force you to (provide excuses?) (written in C language)

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>