0% found this document useful (0 votes)
3 views

Ko2016WhatAreProgrammingLanguages

Uploaded by

The Best212003
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Ko2016WhatAreProgrammingLanguages

Uploaded by

The Best212003
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

What Is a Programming Language, Really?

Amy J. Ko
The Information School
University of Washington, Seattle, WA, USA
[email protected]

Abstract What other definitions of PL exist and what research do


they demand? Clearly, the dominant academic view of PL is
In computing, we usually take a technical view of program- a formal one. I asked several PL researchers for their defini-
ming languages (PL), defining them as formal means of tions and most provided definitions like “formal expressions
specifying a computer behavior. This view shapes much of of computation.” Others went further, making stronger state-
the research that we do on PL, determining the questions we ments such as the Curry-Howard correspondence, which de-
ask about them, the improvements we make to them, and scribes programs as proofs and proofs as programs. These
how we teach people to use them. But to many people, PL conceptions of PL engender mathematical questions, such
are not purely technical things, but socio-technical things. as: What is a correct program? How do we prove a program
This paper describes several alternative views of PL and how correct? What notations exist to express computation?
these views can reshape how we design, evolve, and use pro- These formal definitions are productive, contributing to
gramming languages in research and practice. many advances in program correctness. That said, this defi-
Categories and Subject Descriptors D.3.3 [Program- nition is not necessarily the “correct” definition. For exam-
ming Languages]: Language Constructs and Features ple, another view of PL is as a kind of natural language.
This is, after all, the historical reason why we call PL “lan-
General Terms Human Factors guages,” and why we use words such as “syntax”, “gram-
mar”, and “semantics” to specify their rules. Devanbu et al.
Keywords Definitions, human-computer interaction extended this metaphor through a statistical lens, finding, for
example, that defective code is often improbable based on
1. What Is a Programming Language? patterns in how a PL is used [6]. These perspectives are also
Casually, the answer to this question is an obvious one: pro- related to linguistic ideas such as the Sapir-Whorf hypothe-
gramming languages (PL) are notations for telling comput- sis, which suggests that language determines thought, or at
ers what to do in the future. For the purposes of conversation, least influences it. This leads to questions such as: How do
this definition appears conceptually valid and it portrays the PL abstractions shape the computation that programmers
experience of programming. It’s also kind of boring. write? What capacity do PL have for novel computational
And yet, subtle aspects of definitions can play an outsized expression? How does language design bias the type of com-
role in shaping our views. For example, in the definition putation that programs do? By answering these questions,
above I used the verb “tell”. This word implies human activ- we can begin to see programs as speech, with regularity, but
ities in communication, such as listening, turn-taking and also capacity for syntactic and semantic surprise.
miscommunication. It’s imperative tone even connotes a re- It is also possible to view PL as a kind of documentation.
lationship of dominance, with the programmer commanding After all, it is not source code that we usually execute, but a
a computer, and the computer complying. It is these ideas compiled translation of source, suggesting that the true role
that make this definition feel right: we do control computers, of a language is to help programmers reason about how a
there are miscommunications, and it frequently feels like program computes. If we take this view, a good PL should
computers are not listening, despite us being in charge. streamline human comprehension, begging questions such
However, it also these ideas that make the communication as: What affects language readability? How does notation
metaphor useful. By thinking of PL through this lens, we can affect comprehension? What makes a notation defect prone?
re-envision PL. For example, if programming is about “tell- Stefik et al. take this view [5], exploring the cognitive prop-
ing,” perhaps IDEs are like human translators, facilitating di- erties of PL and their effects on code comprehension.
alog between two agents that do not speak the same lan- A more cynical view of PL is as little more than the glue
guage. Human translators have to listen vigilantly, editorial- between APIs, frameworks, libraries, platforms, and ser-
izing for expediency. Perhaps IDEs need to do the same. vices. This view is often the dominant view amongst modern
web developers and other engineers tasked with building
Permission to make digital or hard copies of all or part of this work for personal or large systems inside of large software ecosystems via func-
classroom use is granted without fee provided that copies are not made or distributed
for profit or commercial advantage and that copies bear this notice and the full citation tion calls [2]. It provokes questions such as: What makes
on the first page. Copyrights for components of this work owned by others than ACM good computational glue? Do PL matter at all, when most
must be honored. Abstracting with credit is permitted. To copy otherwise, or republish,
to post on servers or to redistribute to lists, requires prior specific permission and/or a modern programs are just function calls? This view suggests
fee. Request permissions from [email protected]. that languages are simply interchangeable connectors be-
PLATEAU’16, November 1, 2016, Amsterdam, Netherlands tween functionality.
c 2016 ACM. 978-1-4503-4638-2/16/11...$15.00
http://dx.doi.org/10.1145/3001878.3001880

32 Most up-to-date version: 06/24/2021


Others have viewed PL as an interface between a person Because knowledge of PL is still limited to a small mi-
and a computer. In fact, from a historical perspective, PL nority of humanity but are used to shape an increasing pro-
were the first user interface to computers. From this view, portion of humanity’s experiences in life, PL can also be de-
languages have properties that any user interface has, includ- fined as a form of power. Knowing a language means con-
ing usability, learnability, feedback, error-proneness, user trol over a computer, but it also means control over others
efficiency, and so on, suggesting questions such as: How can computers, and by extension, designing and deciding how
we measure PL usability? What makes a PL learnable? people experience the extent of their lives. In the same way
What aspects of PL design affect its error-proneness? Stefik that reading literacy is a form of power, PL provokes ques-
[5] investigates these questions too, building upon HCI per- tions such as: With great programming power, should great
spectives from Pane and Myers in their design of HANDS responsibility come as well? What kind of social power do
[4], which sought to design a language based on the chil- programming languages provide? Who has rights to the so-
dren’s descriptions of the rules of digital games. cial power of programming languages?
A related view frames PL as notations for describing the To those who do not know a PL, PL might also be viewed
future. For example, Blackwell defined programming as an as a path to prosperity. Knowing a PL means having access
activity in which someone shapes multiple possible future to the highest paying jobs in our global economy. In many
states in time and space with the aid of notation and abstrac- places in the world, they represent stability and wealth. This
tion [1]. From this view, we might ask: What kinds of future view of programming languages asks: Who should have ac-
states of the world can be described? What are the limits of cess to programming language knowledge? Can everyone
people’s ability to reason about future states? How do nota- learn a programming language? What are the economic
tions enable people to reason about classes of future states? consequences of everyone knowing a little bit about PL? As
These questions are psychological, inquiring how humans the world begins to shift education policy to bring computing
use notation to model the behaviour of not only computers, education to everyone with initiatives such as the White
but people and other entities that can take instruction. House’s CS for All and other countries’ efforts to implement
Alternatively, there are many that view PL as expressive K-12 CS education, it is up to researchers to carefully con-
media. Resnick, for example, views Scratch [7] as media for sider the answers to these questions.
self-expression, and Shapiro views Blocky Talky [3] as sup-
porting play. These perspectives frame PL as like any other 2. What’s Next?
creative medium, but with opportunities for interactivity and Each of these views contains a research agenda. Some of
storytelling. This view suggests questions about the expres- these agendas are already deeply explored—we understand
sive capacity of a PL, such as: How can we measure the what PL are formally and we increasingly understand what
breadth of a language’s expressive capacity? How does a they are as tools. Other agendas, particular those that probe
notation’s black box abstractions limit expression? What the human, social, societal, and ethical dimensions of PL, are
can a PL uniquely express that other PL cannot? Ideas such hardly explored at all. As researchers, we should be con-
as McLuhan’s “the medium is the message” extends these cerned with every view, and see each as an opportunity to
questions further, suggesting that languages might shape understand holistically how PL can shape our world.
perceptions of what computation is and what it is for.
Some view programs as policy, expressing an agreement References
between designers and users about what computation will
and will not be possible. In fact, in many software engineer- [1] Blackwell, A.F. (2002). First steps in programming: A
ing contexts, programs are expressions of contractually ob- rationale for Attention Investment models. IEEE
ligated requirements. In this view, PL are the medium VL/HCC, 2-10.
through which a contract is satisfied. If we extend this to a [2] Brandt, J., Guo, P. J., Lewenstein, J., Dontcheva, M., &
view of programs as social contracts (ala Rousseau [8]), we Klemmer, S. R. (2009). Two studies of opportunistic
might ask questions such as: What rights do users have in programming: interleaving web foraging, learning, and
shaping these contracts? Do PL have to be readable by all writing code. ACM CHI, 1589-1598.
in order to preserve human agency? What power do PL de- [3] Deitrick, E., Shapiro, R. B., Ahrens, M. P., Fiebrink, R.,
signers have in shaping policy? By thinking of languages as Lehrman, P. D., & Farooq, S. (2015). Using distributed
media in which laws, regulations, contracts, policies, and cognition theory to analyze collaborative computer sci-
rules are expressed, we can productively and provocatively ence learning. ACM ICER, 51-60.
explore the relationship between programs and civil rights. [4] Pane, J.F., Myers, B.A., & Miller, L.B. (2002). Using
My colleagues in information science often led me to HCI techniques to design a more usable programming
wonder whether it is information or computation that is the system. IEEE VL/HCC, 198-206.
more dominant phenomenon in computing. After all, when [5] Stefik, A. & Hanenberg, S. (2014). The programming
you have a pioneer like Bill Gates claiming “content is language wars: questions and responsibilities for the
king,” it suggests that computation, algorithms, and data programming language community. ACM Onward!,
structures might just be conduits for the flow of infor- 283-299.
mation through social systems. In this view, we wonder: [6] Ray, B., Hellendoorn, V., Godhane, S., Tu, Z., Bac-
How do PL bias and privilege information? How do lan- chelli, A., & Devanbu, P. (2016). On the naturalness of
guages warp the meaning in information through their ab- buggy code. ICSE, 428-439.
stractions? As conduits for information, what benefits and [7] Resnick, M., & Silverman, B. (2005). Some reflections
trade-offs do PL offer relative to other types of information on designing construction kits for kids. Interaction De-
containers such as writing and speech? These questions sign and Children, 117-122.
view computing as (imperfectly) modelling information. [8] Rousseau, J.J. (1913). Social contract & discourses.
New York: E.P. Dutton & Co.

33

You might also like