Distinctive features of programming languages

Besides the syntax of each language (for example, print v. Echo), what are some key distinguishing characteristics that should be sought to distinguish a programming language?

As a newbie to programming, I am still confused between the strengths and weaknesses of each programming language and how to distinguish them from their aliases for common native functions. I find it much easier to classify languages ​​based on a set of distinguishing features, for example. OOP v. Functional.

+7
syntax programming-languages
source share
8 answers

There are many things that define PL, here I will list a few:

  • Is this a procedural, OO, imperative?
  • It has a strong type check (C #, C ++, Delphi) or dynamic (PHP, Pythong, JS)
  • How are links handled? (Does pointers hide like C #?)
  • Is a runtime (C #, Java) required or is it native to the OS (C, C ++).
  • Does it support streams (e.g. Eiffel needs additional libraries)

There are others, like garbage collectors, parameter handling, etc. The Eiffel language has an interesting function called Design By Contract, I have not seen it in any other language (I think C # 4.0 has it now), but it can be very useful if it is used well.

I would recommend you take a look at Bertrand Meyer's work to gain a deeper understanding of how submarines work and what defines them. Another thing that PL can determine is the level of interaction with the system, this is what makes the difference between low-level languages ​​and high-level languages.

Hope i can help

+6
source share

In a domain (imperative, functional, concatenative, term rewriting), it is sometimes best to look at the presence or absence of a particular set of functions. For example, for the imperative of the main thread.

  • First order functions
  • Shutters
  • Built-in classes, prototypal inheritance, or toolkits (example: C ++, Self / JavaScript, Lua / Perl)
  • Complex data types (larger than an array)
  • Built-in concurrency primitives
  • Futures
  • Pass by value, pass by name, pass by reference or a combination thereof
  • Garbage collected or not? What kind?
  • Event
  • Interface types, types based on classes or without custom types (Go, Java, Lua)

etc.

+4
source share

You can consider things like:

  • Can you call functions?
  • Can you pass functions to other functions?
  • Can you create new features? (In C, you can pass function pointers to functions, but you cannot create new functions)
  • Can you create new data types?
  • Can you create new data types with functions that work with them? (typical basis for "OO" languages)
  • Can you execute code that was not available at compile time (possibly with the eval function)?
  • Should all types be known at compile time?
  • Are types available at runtime?
0
source share

The difference between low-level and high-level languages. (Although “low” and “high” are relative terms.)

A high-level language will use abstraction to hide the details that low-level languages ​​can provide to the user. For example, in Matlab or Python, you can initialize an N-dimensional array in one command. Not so in C or assembly.

0
source share

IMHO the power of language is determined by how many things you can do with it; how fast and how easy you can achieve goals.

The weaknesses of the language are the sum of the limitations (of various types) that you encounter when trying to achieve your goal.

0
source share

There are many functions that a programming language can support. In addition, these functions are not always mutually exclusive. For example, OCaml and F # are functional and object oriented. In addition, writing a list of all the paradigms that a language can support will be exhaustive, but there is a book called “Pragmatics of a programming language,” which is a comprehensive treatment of many paradigms found in programming languages.

However, for me, the important things I need to know when working with the language are the following:

  • It is dynamically or statically typed.
  • Is it a typed language, and if it is printed, is it strong or weak?
  • Does garbage collect
  • Does it support a pass by value, or does it pass by reference semantics, or both?
  • Does it support first-order functions (i.e. functions can be considered as variables)
  • Object oriented
  • polymorphism. Is it parametric or ad-hoc.
  • How expressive is the type system (i.e. I can create leaky abstractions)
  • Overloaded Methods
  • General (templates)
  • Exception Handling.
0
source share

General note: many of this classification scheme are not comprehensive and not so good. And the links are mostly located on Wikipedia. Therefore, keep in mind.

0
source share

You may consider other features, such as:

  • Strong versus weak and static versus dynamic input, support for typical input
  • How memory is processed (it is abstracted or you have direct control over your data, pass it by ref vs pass by value)
  • Compiled vs are interpreted as part of two
  • Custom types are available ... classes, structures, tuples, lists, etc.
  • Regardless of whether streaming objects are installed or if you need to access external libraries.
  • The ability to generate coding ... Metaprogramming a C ++ template is a form of this
  • In the case of OOP, single vs multiple inheritance, interfaces, anonymous / inner classes, etc.
  • Is the language a multi-paradigm (i.e. C # and its support for functional programming)
  • Reflection availability
  • Language verbosity or the amount of "syntactic sugar" ... for example. C ++ is pretty verbose when it comes to iterating over a vector. Java is pretty concise when anonymous inner classes are used to handle events. Understanding Python lists saves a ton of input.
0
source share

All Articles