Of paradigms and languages. Programming in Linux 5

Of paradigms and languages

En this series of articles intended to give a frame of reference to our readers interested in learning to program in Linux, time to talk about coding. Remember that we had said that programming is not only writing code, it also encompasses making decisions about what the program should do, how it should do it and how it will be determined that it does it properly.

How to choose a language and not die trying

The current trend promoted by politicians and the media, that it is enough to teach programming to the unemployed to end unemployment and poverty is not new. I grew up with Home Computers in the 80s and I still remember high school advertisements that promised a future of greatness if you signed up for their Basic course. Basic, as its name implies, was (is) a language to teach the rudiments. Learning it helps you become a professional programmer just as learning to read helps you become a doctor.

On the web there are tons of articles defending that this or that programming language is the best option. The truth is that there is no such thing as that. Our grandparents could learn typing or shorthand with a certain method and with that endure their whole lives. There is no equivalent in programming, paradigms change, new devices appear. It is necessary to work with different input and output methods.

That is why Instead of making the usual list of programming languages, I am going to dedicate a few paragraphs to the different paradigms in programming languages.

Very few languages ​​implement a 100% paradigm. There are some that for the most part will ascribe to one but implement some features of another when necessary. On the contrary, many allow programming in one or more paradigms. They are called multiple paradigm languages.

Of paradigms and programming languages

The word paradigm should not be related to a specific programming language, but to a methodology for creating programs. Although any language can be used with any paradigm, their creators had a particular methodology in mind when they created them, so it will be easier to use them within it.

Some common paradigms are:

  • Functional paradigm:  It emphasizes the evaluation of mathematical functions combined with expressions. In functional programming, instead of assigning functions to variables, you combine function calls. Some supported programming languages ​​are: LISP, Scheme and Haskell
  • Imperative paradigm: The imperative paradigm takes better advantage of the ability of computers to access and modify the content of memory. That makes it ideal for applications where some elements of the function vary constantly. ANDIn the programs written under it, the commands show how the calculation is performed, step by step. Each step affects the overall state of the calculation. Among the programming languages ​​we can mention: Algol 68, Cobol, C, Fortran and ADA.
  • Logical paradigm: Not all problems can be represented as mathematical functions. That is why in this paradigm emphasis is placed on the relationships between elements. Programs are built by establishing relationships that specify facts and inference rules, and then automatically check whether a premise is true or not. The best known of the programming languages ​​under this paradigm is Prolog.
  • Object-oriented paradigm: The other paradigms consider data and what is done with it as separate entities. This paradigm unites the data and the procedures that are applied to it in entities called objects. Scheduling is based on sending messages to objects. Objects respond to messages by performing operations, generally called methods. Messages can have arguments. Here we meet some acquaintances; C ++, Python or Java to mention a few.

Don't let all this talk scare you. It was necessary to talk about the paradigms because when you delve into any of them the topic will come up. The best thing you can do is try different languages ​​to test which one you feel most comfortable with and then try others that belong to the same paradigm.


Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: AB Internet Networks 2008 SL
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.