1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
ElenaW [278]
2 years ago
9

How each programming language differs in terms of constructs, techniques, use and requirements?

Computers and Technology
1 answer:
Anuta_ua [19.1K]2 years ago
6 0

Programming languages are (designed to be) easily used by machines, but not people.

Natural languages (like English) are easily used by humans, but not machines.

Programming languages are unambiguous, while natural languages are often multiply ambiguous and require interpretation in context to be fully understood (also why it’s so hard to get machines to understand them). Natural languages are also creative and allow poetry, metaphor and other interpretations. Programming does allow some variation in style, but the meaning is not flexible.

Lojban (Wikipedia) is an artificial language designed to try to bridge the gap between these two types of languages. It is specifically unambiguous yet something that a human can pronounce and even speak meaningfully. It can be considered a somewhat successful experiment yet limited in functionality in some ways in both domains (and not a real substitute for a normal programming language, but perhaps useful as an interface).

Natural languages consist of sentences, usually declarative sentences expressing information in a sequence. Programming languages typically are not declarative but procedural, giving instructions to the machine to do something (like commands in natural languages). Rarely, programming languages are declarative, such as Prolog, where statements are given to the computer, then the evaluation consists of finding possible solutions that match those statements (generate a list of words based on possible combinations of letters as defined just by letter-combining rules, for example).

The vocabulary of natural languages is filled with conceptual terms. The vocabulary of programming languages is generally only ‘grammatical’/functional ‘words’ like basic comments, plus various custom-named things like variables and functions. There are no words like you’d look up in a dictionary to express something like ‘love’ or ‘happy’ or ‘sing’.

The grammatical structures vary in more ways than are easy to list here. But some of the most obvious factors are that words don’t have separable parts in programming languages (like English cat-s to form a plural) [=no morphology], and that via brackets, line breaks or other markers, embedding tends to be overtly and clearly marked on both sides for the parser in programming languages, whereas spoken languages usually only have one word (like “that”) linking embedded sentences, and sometimes no word at all. This is another reason that parsing human languages is so hard on a computer.

You could also look at Hockett’s design features and see which apply to programming languages: What is the difference between human and animal language?

In a very general sense, programming languages aren’t used for bidirectional communication and may not properly be considered “languages” in the same sense as natural languages. Just looking at Hockett’s features, they’re completely distinct in being written only, do not involve interchangeability between the speaker and hearer, do not have ‘duality of patterning’ meaning multiple layers of structure as sounds vs. phrases (phonology vs. syntax), and are not transmitted culturally (well, maybe). It’s just very hard to even try to make the comparison.

Most fundamentally, it is worth asking if programming languages even have meaning, or if they are just instructions. This is similar to the Chinese room thought experiment— given a book of instructions for how to translate Chinese, but without actually understanding it, would a human (or computer) with that book be considered to “know” Chinese? Probably not. A computer doesn’t “know” anything, it just does what the instructions tell it to. Therefore, programming languages have no semantics/meaning. They just are instructions, which translate into electronic signals, nothing more.

You might be interested in
Mation about which osi layers of connected cisco devices can be verified with the show cdp neighbors comm
fgiga [73]
The show CDP neighbor command operates at the Data link layer (Layer 2)

Cisco Discovery Protocol (CDP) is a proprietary Data Link Layer protocol developed by Cisco Systems. It is used to share information about other directly connected Cisco equipment, such as the operating system version and IP address.

6 0
3 years ago
Consider a single CPU system with an active process A. Explain what happens in the following circumstances including any interru
Anika [276]

Answer:

The answer to this question as follows:

Explanation:

In option a, When we use fork, a new mechanism, that uses fork() method, which is in the parental process, to replicate all sites. It has been installed in a space-differentiating operating system.

In option b, It is the present system cycle that scan and wait for any of the system processor to be installed.

In option c,  The time delay happens when A operates. It is a global that make issues, which are cleared and slowed down when an interrupt happens. In this process, there are not any distractions. It splits into slowly as it heads into the ISR. It helps to understand the code easily.

5 0
3 years ago
In this exercise, your function will receive 2 parameters, the name of a text file, and a list of strings. The function will wri
diamong [38]

Answer:

# the function is defined

# it takes 2 arguments: filename and list of string

def solution(filename, listOfString):

   # the file is opened in write mode

   # so that we can write to it

   with open(filename, 'w') as file_object:

       # we loop through the entire list of string

       # this looping help us know what to write to the file

       for each_string in listOfString:

           # if the length of the string is less than 4

           # we write 'x' with a new line

           if len(each_string) < 4:

               file_object.write("x\n")

           # else if the length of the string is greater than equals 4

           # we write the fourth character

           # and also add new line

           else:

               file_object.write(each_string[3])

               file_object.write("\n")

Explanation:

The function is written in Python. It takes two argument; filename and list of string.

It opens the file in write mode and then loop through the list of string. During the loop, we know what to write to the file.

In the length of a string is less than 4; we write 'x' else we write the fourth character in the string. The fourth character has an index of 3 because string uses zero index counting like a string. Starting from zero; 0, 1, 2, 3, 4... the fourth character has an index of 3.

5 0
3 years ago
Ally typed a business letters she most likely used a
Zarrin [17]

Answer:

Ally typed a business letters she most likely used a  <u>Word Processor</u>.

Explanation:

Word processors are the tools that are used to process the text in terms of formatting, printing and editing the text document. These programs or software are used to write the text document with ease.

Microsoft word and word perfect are the examples of the word processors.

We can write the text on note pad as well, but we cannot apply different fonts style, size and formatting techniques on that application. Word processors provide a lot of fonts styles and formatting options to make the document appealing.

6 0
3 years ago
a circuit has an inductor with an inductive reactance of 230 ohms. this inductor is in series with a 500 ohm resistor. if the so
Amanda [17]

Answer: attached below

Explanation:

8 0
3 years ago
Other questions:
  • You can use automatic link-checking software to identify invalid hyperlinks. if you find invalid links, what should you do next?
    13·1 answer
  • What is the service provided by a third party (such as an ISP) that enables you to connect another cloud directly to your Google
    15·1 answer
  • The page orientation in which the page width is greater than the page height is called
    8·1 answer
  • Piers wants to take a course on XML. He is a certified web designer, but he has not used XML before. How can he use XML to impro
    6·1 answer
  • A. Draw a flowchart or write pseudocode to represent the logic of a program that allows the user to enter an hourly pay rate and
    8·1 answer
  • What is key for evaluating internal controls such as human resources, logistics, information technology, risk, legal, marketing
    11·1 answer
  • An organization is assigned a Class-C network 200.120.80.0 and wants to form subnets for its threedepartments: D1 (60hosts), D2
    7·1 answer
  • Who is hurt by piracy
    10·1 answer
  • Which of the following is used to move to end of the row?​
    8·1 answer
  • Write a loop that continually asks the user what pets the user has until the user enters stop, in which case the loop ends. It s
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!