Re: Spoken programming language
From: | Benct Philip Jonsson <bpj@...> |
Date: | Saturday, January 3, 2009, 21:17 |
Gary Shannon wrote:
> I still think the following kind of distinction needs to be made:
>
> Assert(apple.color == red); // "I assert/claim/state that the apple is red."
>
> Query(apple.color == red); // "Is the apple red?"
>
> Imperative(apple.color = red); // "Make the apple red!"
>
>
> --gary
>
And I think they ought to be expressed with
operators/ideographs rather that functions,
if the exercise is going to be anything but
a weird resyntax for English:
apple == red; // "I assert/claim/state that the apple is red."
apple ?= red; // "Is the apple red?"
apple != red // "The apple isn't red."
apple =: red; // "Make the apple red!"
apple =~ red // "The apple becomes red (on its own accord)."
where I've omitted the .color bit since dufferent
kinds of properties are normally not treated as
categories in natlangs: redness is a property
and tallness another property, not values of
color and length properties. I guess that the
dot operator could be taken to express a genitive
relation so that
apple.color == red // "The color of the apple is red"
which in a natlang is a statement about the color
'thing' and not the apple 'thing'; association with the
apple is rather a property of the color than the other way
around the way a natlang sees it.
I guess there would need to be different operators for
property and identity, so that
city = apple // the city is an apple
city ? apple // is the city apple-like
city ! apple // the city is not an apple
city : apple // Make the city into an apple!
city ~ apple // The city becomes an apple
Which are distinct from
city == apple // the city shares properties with an apple
(but isn't one)
etc.
I guess in such a language it makes sense to let
adjectives be verbs, so that we get
man == run // the man runs
man =: run // Run, man!
man =~ run // The man starts running
But I guess what I'm developing here is a writing
system where grammatical relations are expressed
by ideographs...
I guess that one fundamental difference between
programming languages and natlangs is that to the
former there are functions, objects, properties and
values, but to natlangs there are just objects
entering different relations to each other.
Witness the fact that 'run' can be a verb,
a noun or an adjective (participle) the exact
function of which relative to other objects is
expressed by operators, which may be null in
a natlang. When kids say 'runned' they just
make the operator, comparable to other operators
in 'runs, runs, run's, runner' (yes, there are three
-s operators in English, just like there are a lot
of null operators, and the sets overlap.
And yes I do claim that natlangs have a fundamental
bipartition of their vocabulary into operators and
objects, even tho we call the one set 'form words
and affixes' and the other 'content words or roots'.
/BP 8^)>
--
Benct Philip Jonsson -- melroch atte melroch dotte se
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"C'est en vain que nos Josués littéraires crient
à la langue de s'arrêter; les langues ni le soleil
ne s'arrêtent plus. Le jour où elles se *fixent*,
c'est qu'elles meurent." (Victor Hugo)