Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Distinctive characteristics of programming languages [closed]

Beyond the syntax of each language (e.g. print v. echo), what are some key distinctive characteristics to look out for to distinguish a programming language?

As a beginner in programming, I'm still confused between the strengths and weaknesses of each programming language and how to distinguish them beyond their aliases for common native functions. I think it's much easier to classify languages based on a set of distinctive characterstics e.g. OOP v. Functional.

like image 766
Gio Borje Avatar asked Nov 20 '10 06:11

Gio Borje


People also ask

What are the characteristics of a programming language?

Characteristic of A Good Programming Language 1) Clarity, Simplicity And Unity: A Programming language provides both a conceptual framework for Algorithm planning and means of expressing them. It should provide a clear, simple and unified set of concepts that can be used as primitives in developing algorithms.

What languages have closures?

Some languages have features which simulate the behavior of closures. In languages such as Java, C++, Objective-C, C#, VB.NET, and D, these features are the result of the language's object-oriented paradigm.


2 Answers

There are many thing that define a PL, here I'l list a few:

  • Is it procedural, OO, imperative?
  • Does it has strong type checking(C#, C++, Delphi) or dynamic(PHP, Pythong, JS)
  • How are references handled? (Does it hide pointers like C#?)
  • Does it require a runtime (C#, Java) or is it native to the OS(C, C++)
  • Does it support threads (E.g Eiffel needs extra libraries for it)

There are may others like the prescense of garbage collectors, the handling of params, etc. The Eiffel language has an interesting feature which is Design By Contract, I haven't seen this on any other language(I think C# 4.0 has it now), but it can be pretty useful if well used.

I would recommend you to take a look on Bertrand Meyer's work to get a deeper understanding on how PL's work and the things that define them. Another thing that can define a PL is the interaction level with the system, this what makes the difference between low-level languages and high-level languages.

Hope I can help

like image 123
David Conde Avatar answered Nov 03 '22 00:11

David Conde


In a domain (imperative, functional, concatenative, term rewriting), sometimes its best to look at the presence or absence of any particular set of functionality. For example, for the main stream imperative.

  1. First order functions
  2. Closures
  3. Built in classes, prototypical inheritance, or toolkit (Example: C++, Self/JavaScript, Lua/Perl)
  4. Complex data types (more than array)
  5. In-built concurrency primitives
  6. Futures
  7. Pass by values, pass by name, pass by reference or an combination thereof
  8. Garbage collected or not? What kind?
  9. Event-based
  10. Interface based types, class based types, or no user types (Go, Java, Lua)

etc

like image 31
Yann Ramin Avatar answered Nov 03 '22 01:11

Yann Ramin