Redefining the word language

2011-02-23 Thread Kari Laitinen


Hello All,

To respond to the previous discussion related
to programming languages and natural languages,
I decided to start a new discussion. My purpose
here is to explain a kind of language theory that I
developed quite many years ago.

A classic book about the C programming language
begins with a program that contains the statement

   printf(hello, world);

It has been said, however, that the printf function
that is used in the above statement does not
belong to the language itself but it is a library
function. To me, this raises questions: Why
begin a book about a programming language by
showing something that does not belong to the language?
If the above printf function does not belong to the
used programming language, into which language it belongs?

To respond to questions like these in the context of
computer programs, I have redefined the word language
so that there does not exist pure programming languages
or natural languages. Instead, each computer program
or any other document has its own language that
can be defined as a set of symbols. For example,
the language used in the above statement, consists
of the symbols

printf   ( hello   ,   world   )   ;

Similarly, it would be possible to list all the
symbols that are used in this message. That set of
symbols would be the language used in this message.
The language of the single statement above would then
be a sub-language of the language of this message.

With this kind of view to languages it is possible
to try to figure out how complex some programs or
other documents are. The language theory is
explained in more detail in the paper
http://www.naturalprogramming.com/to_read/estimating_understandability_etc.pdf

I would like to emphasize that I discuss languages
here from the human point of view (e.g. how a human
understands a computer program.) How a compiler
'understands' a program is quite well defined.

When a language is treated as a set of symbols,
less emphasis is put to the syntax of the language.
It can be assumed that it is part of the meaning
of a symbol how it can be connected with other
symbols. In the world of (spoken) languages the
meanings of symbols change. For example, originally
the word 'Google' was a noun (name), but later on it
has been used as a verb.

It is also important to note that a person can think
that another person has misunderstood a symbol or
a set of symbols of a language. I cannot know how
you interpret the symbols that are used in this
message. However, I can be sure that the symbols
themselves will stay the same regardless of how they
are understood.

A person can have a weak or strong meaning for a symbol.
For example, the meaning of the symbol 'printf' above
can vary depending on how much the reader is familiar
with C programming.

I think this theory of languages is related to the
quasi-linguisticness that was discussed in an earlier
thread.

- Kari


--
The Open University is incorporated by Royal Charter (RC 000391), an exempt charity 
in England  Wales and a charity registered in Scotland (SC 038302).



Re: Computers are systems not languages

2011-02-23 Thread Richard O'Keefe

On 24/02/2011, at 5:18 AM, alex wrote:

 Hi Andrew,
 
 Thanks for the illuminating response,
 
 On 22 February 2011 03:39, Andrew Walenstein walen...@ieee.org wrote:
 Even if you don't like these two arguments, surely most would admit that
 *one* of the primary purposes of good programming languages is human-human
 communication.   In fact, this was an essential point of the title of Peter
 Naur's collection Computing:  A Human Activity.  In this narrow sense
 programming languages and natural languages are not incomparable.
 
 I hadn't read Peter Naur's work before, and am now very much enjoying
 what I can find.  I've just got my hands on a copy of the collection
 you cite, and it includes the following:
 
  PROGRAMMING LANGUAGES ARE NOT LANGUAGES--WHY 'PROGRAMMING LANGUAGE'
 IS A MISLEADING DESIGNATION
 http://www.naur.com/comp/c8-4.html
 
 This seems very relevant to this discussion!  Although Naur thinks
 computing is a human activity, Naur doesn't appear to think that
 programming languages are languages.

This is the same Naur who wrote

I cannot help expressing a feeling of awkwardness at the use of
the word language in the context programming language.
I definitely feel that if taken literally this habit of expression
is misleading.
As a first step to subdue our feeling of guilt at this misuse of
the term, perhaps we can remind ourselves that logicians and
mathematicians used the word for specialized notations long before
we did, already in the 1930's, and perhaps even before.
...
Several of the social aspects of mathematics and natural languages
show a meaningful analogy with similar aspects of programming languages.
It therefore makes sense to extrapolate the analogy to further such
aspects. 

in a paper devoted to pursuing some of those analogies:
Programming Languages, Natural Languages, and Mathematics,
Peter Naur, CACM 18(12) December 1975.

 After a quick read his argument seems to be that grammar rules are not
 important to language, but that speech is the primary form of
 language, and that speech is ungrammatical.  Language then is not a
 thing that can be specified, but rather something you do, by speaking.
 He asserts that dictionaries and the like are unimportant, and people
 demonstrably don't understand each other's utterances anyway, at least
 not very far.  That is, that meaning is a personal matter.

Someone who uses language to tell us something is by his actions
*denying* that meaning is a personal matter, for if it were so, he
might as well expect the same outcome from grunting and scratching
his chest.






-- 
The Open University is incorporated by Royal Charter (RC 000391), an exempt 
charity in England  Wales and a charity registered in Scotland (SC 038302).