Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is a programming language? [duplicate]

People also ask

What is duplicate in programming?

In computer programming, duplicate code is a sequence of source code that occurs more than once, either within a program or across different programs owned or maintained by the same entity. Duplicate code is generally considered undesirable for a number of reasons.

Why is code duplication a problem?

It's safe to say that duplicate code makes your code awfully hard to maintain. It makes your codebase unnecessary large and adds extra technical debt. On top of that, writing duplicate code is a waste of time that could have been better spent.

Is it okay to duplicate code?

Duplication is bad, but… It isn't a question of whether you'll remember: it's a question of when you'll forget.” Which makes perfect sense. It's time well spent when you try to make your code streamlined and readable. You'll end up with a cleaner, easier-to-maintain, and more extensible code base as a result.


I think, Wikipedia has got this one very right:

A programming language is an artificial language designed to express computations
that can be performed by a machine, particularly a computer.

The first sentence is enough to describe what it is:

  • it is an artificial language (that is the root of it)
  • it is designed to express computations that can be performed by a machine (that is the target/purpose of the language)

This is what a programming language is in its most general definition.

Your definition lacks this generality (for example your sentences fit rather good for command oriented languages, but not for e.g. logical programming).


Programming language is way to express commands and orders to specific actors.

Programming language consists of a notation and a set of rules, either expressed or implied, such that any actor that executes a program will not violate the rules.

I disagree that programming language has

  • anything to do with computations--see Logo
  • anything to do with computers--see any cookbook
  • anything to do with humans as a source of a program--see compiler that yields assembly
  • is just a way to encode/decode information--there's a plenty of stuff that do the same, but they're not P.A.

Its a way softwares (computer programs) interact with each other. And its an interface to humans interact with computers.


The definition i like :)

Programming language is special vocabulary for instructing computer: a unique vocabulary and set of rules for writing computer programs