Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: All languages are equally fit

0 views
Skip to first unread message

Joachim Pense

unread,
Nov 7, 2009, 1:05:51 AM11/7/09
to
António Marques (in sci.lang):

> On Nov 6, 9:19 pm, Joachim Pense <s...@pense-mainz.eu> wrote:
>> António Marques (in sci.lang):
>>
>> > On 6 Nov, 18:44, Joachim Pense <s...@pense-mainz.eu> wrote:
>> >> Why do you think higher level
>> >> programming languages exist? They have been invented because it is
>> >> easier to write complex programs in them than it is if you write
>> >> machine code that does the equivalent job. Some programming languages
>> >> are flexible in the code they accept precisely to allow for pragmatics
>> >> in the code.
>>
>> > I must be missing something. What exactly (in programming languages)
>> > are you talking about?
>>
>> Pragmatics. I had given an example before.
>
> Must have missed it. Be so kind as to elaborate, give another example,
> etc.

The following lines of Perl all do the same thing but are pragmatically
different:

if ($a != 1) {$b = 17}

unless ($a == 1) {$b = 17}

$b = 17 unless $a == 1

$a == 1 or $b = 17

$a != 1 and $b = 17

Joachim

António Marques

unread,
Nov 7, 2009, 6:08:33 AM11/7/09
to

I see what you mean. Sorry I hadn't spotted it earlier and made you
repeat it.
However, I don't think these are examples of pragmatics. They are
structurally different ways of getting the exact same result; their
intent, as you mention, is to better model what's on the programmer's
mind - say, make the language more semantic programmer-wise. In what
way do you consider it to be an example of pragmatics?

Joachim Pense

unread,
Nov 7, 2009, 7:46:43 AM11/7/09
to
António Marques (in sci.lang):

In my view these are examples of topicalizing a sentence differently. Isn't
topicalization part of pragmatics?

I think "better model what's on the programmer's mind" is more a pragmatic
than a semantic concept.

Joachim

Herman Rubin

unread,
Nov 7, 2009, 10:42:05 AM11/7/09
to
In article <hd32i9$ojj$02$1...@news.t-online.com>,
Joachim Pense <sn...@pense-mainz.eu> wrote:
>Antnio Marques (in sci.lang):

>> On Nov 6, 9:19pm, Joachim Pense <s...@pense-mainz.eu> wrote:

>>> Antnio Marques (in sci.lang):

>>> > On 6 Nov, 18:44, Joachim Pense <s...@pense-mainz.eu> wrote:


....................

>>> > I must be missing something. What exactly (in programming languages)
>>> > are you talking about?

>>> Pragmatics. I had given an example before.

>> Must have missed it. Be so kind as to elaborate, give another example,
>> etc.

>The following lines of Perl all do the same thing but are pragmatically
>different:

>if ($a != 1) {$b = 17}

>unless ($a == 1) {$b = 17}

>$b = 17 unless $a == 1

>$a == 1 or $b = 17

>$a != 1 and $b = 17

I am afraid I cannot see any difference in these,
and the same would be the case if someone had a
reasonable first course, such as should be taught
in primary school, in "mathematical logic".

--
This address is for information only. I do not claim that these views
are those of the Statistics Department or of Purdue University.
Herman Rubin, Department of Statistics, Purdue University
hru...@stat.purdue.edu Phone: (765)494-6054 FAX: (765)494-0558

António Marques

unread,
Nov 7, 2009, 6:22:39 PM11/7/09
to

But pragmatics has to do with how the receiver determines the
speaker's intent. While in your examples the computer always has only
one possible interpretation. Unless you are discussing programming
languages bot as a medium for programmer <> computer interaction, but
as a way to convey information between programmers. In the latter
case, it's only natural that some properties of human language trickle
down into it - but still, in my view, they get there not because of
the need for programmer <> programmer interaction, but as an
expressiveness convenience for the original programmer, regardless of
whether the code will ever again be analyzed by a human or not.

Nathan Sanders

unread,
Nov 7, 2009, 6:08:17 PM11/7/09
to
In article <hd3q1s$n85$01$1...@news.t-online.com>,
Joachim Pense <sn...@pense-mainz.eu> wrote:

It is, but is it part of programming languages? What observable,
functional role does it play? If the compiler cares, then it's not
pragmatics; if the compiler doesn't care, then why should we?

But even if something like pragmatics plays an identifiable role in
computer programming, is it really an inherent part of the computer
language itself, or just something copied over from the programmer's
own native language? That is, do all typical programmers writing in
the same computer language for the same compilers have identical
pragmatic behavior, or does their pragmatic behavior vary based on
their native language? (Or worse, does it vary from individual to
individual in unpredictable ways? If so, that's not pragmatics.)

> I think "better model what's on the programmer's mind" is more a pragmatic
> than a semantic concept.

I remain unconvinced that, in the context of the properties of
computer languages, "what's on the programmer's mind" is a concept
worth making a model of, or even possible to make a useful model of.
Is "what's on the programmer's mind" really consistent and predictable
enough to even be meaningfully modeled?

Nathan

--
Nathan Sanders
Linguistics Program
Williams College
http://wso.williams.edu/~nsanders/

Joachim Pense

unread,
Nov 8, 2009, 2:38:35 AM11/8/09
to
António Marques (in sci.lang):

The receiver we are talking about here is not the computer but the human
reader of a program.

> Unless you are discussing programming
> languages bot as a medium for programmer <> computer interaction, but
> as a way to convey information between programmers.

Of course I do.

> In the latter
> case, it's only natural that some properties of human language trickle
> down into it - but still, in my view, they get there not because of
> the need for programmer <> programmer interaction, but as an
> expressiveness convenience for the original programmer, regardless of
> whether the code will ever again be analyzed by a human or not.

The pragmatical features of human language (e.g. topicalization) also apply
to inner monologues and diary texts that are not supposed to be read by
anybody else.

Joachim

Joachim Pense

unread,
Nov 8, 2009, 3:07:19 AM11/8/09
to
Nathan Sanders (in sci.lang):

There are readers of the program; most important, the programmer herself who
has to understand the code one hour later, And then auditors who check the
code, other programmers who maintain the code.

And, as Antonio wrote, it is there to give the programmer the expressive
power to formulate his ideas and concepts conveniently. Even more so, the
concepts are in the source program, but they are lost in the process of
compilation.

(Sometimes there isn't even a computer involved. Sau-Dan mentioned
Pseudocode; I add that the programming language Algol was designed at the
end of the 50 as an "Algorithmic Language", with the intention to allow
mathematicians to write down numerical algorithms. It even didn't have
input-output statements.)

> But even if something like pragmatics plays an identifiable role in
> computer programming, is it really an inherent part of the computer
> language itself, or just something copied over from the programmer's
> own native language? That is, do all typical programmers writing in
> the same computer language for the same compilers have identical
> pragmatic behavior, or does their pragmatic behavior vary based on
> their native language? (Or worse, does it vary from individual to
> individual in unpredictable ways? If so, that's not pragmatics.)

Interesting question. I never observed anything like this that could give me
a hint how to answer it. The _programming language_ one was trained in
first sometimes show in the way someone programs in other programming
languages.

>
>> I think "better model what's on the programmer's mind" is more a
>> pragmatic than a semantic concept.
>
> I remain unconvinced that, in the context of the properties of
> computer languages, "what's on the programmer's mind" is a concept
> worth making a model of, or even possible to make a useful model of.
> Is "what's on the programmer's mind" really consistent and predictable
> enough to even be meaningfully modeled?

That's what the programmer does when he designs his program.

Joachim

LEE Sau Dan

unread,
Nov 8, 2009, 6:25:38 AM11/8/09
to
>>>>> "Joachim" == Joachim Pense <sn...@pense-mainz.eu> writes:

>> But even if something like pragmatics plays an identifiable role
>> in computer programming, is it really an inherent part of the
>> computer language itself, or just something copied over from the
>> programmer's own native language? That is, do all typical
>> programmers writing in the same computer language for the same
>> compilers have identical pragmatic behavior, or does their
>> pragmatic behavior vary based on their native language? (Or
>> worse, does it vary from individual to individual in
>> unpredictable ways? If so, that's not pragmatics.)

Joachim> Interesting question. I never observed anything like this
Joachim> that could give me a hint how to answer it. The
Joachim> _programming language_ one was trained in first sometimes
Joachim> show in the way someone programs in other programming
Joachim> languages.

Yes. This is especially observable when the "other" programming
language uses a different paradigm. Very often, the programmer is
unable to shift to the new paradigm, and would try to make the new
things look like nails to suit his old hammer. e.g. I've seen
Postscript code (a stack-oriented language) written in a very C-like
style. (C is imperative, (local) variable-based.)


>>> I think "better model what's on the programmer's mind" is more a
>>> pragmatic than a semantic concept.
>>
>> I remain unconvinced that, in the context of the properties of
>> computer languages, "what's on the programmer's mind" is a
>> concept worth making a model of, or even possible to make a
>> useful model of. Is "what's on the programmer's mind" really
>> consistent and predictable enough to even be meaningfully
>> modeled?

Joachim> That's what the programmer does when he designs his
Joachim> program.

Yes. A person who has no experience with a stack-oriented language
(e.g. Forth, Postscript), for instance, would write Postscript code in a
very C-like style. He would not natively use the stack (or even think
about it). He would try to immitate local variables by using a new
dictionary. etc.


See this thread for an example:

http://groups.google.co.uk/group/comp.lang.postscript/browse_thread/thread/a26b9bbebdc678f7

--
Lee Sau Dan 李守敦 ~{@nJX6X~}

E-mail: dan...@informatik.uni-freiburg.de
Home page: http://www.informatik.uni-freiburg.de/~danlee

Joachim Pense

unread,
Nov 8, 2009, 10:13:44 AM11/8/09
to
LEE Sau Dan (in sci.lang):

>>>>>> "Joachim" == Joachim Pense <sn...@pense-mainz.eu> writes:
>
> >> But even if something like pragmatics plays an identifiable role
> >> in computer programming, is it really an inherent part of the
> >> computer language itself, or just something copied over from the
> >> programmer's own native language? That is, do all typical
> >> programmers writing in the same computer language for the same
> >> compilers have identical pragmatic behavior, or does their
> >> pragmatic behavior vary based on their native language? (Or
> >> worse, does it vary from individual to individual in
> >> unpredictable ways? If so, that's not pragmatics.)
>
> Joachim> Interesting question. I never observed anything like this
> Joachim> that could give me a hint how to answer it. The
> Joachim> _programming language_ one was trained in first sometimes
> Joachim> show in the way someone programs in other programming
> Joachim> languages.
>
> Yes. This is especially observable when the "other" programming
> language uses a different paradigm. Very often, the programmer is
> unable to shift to the new paradigm, and would try to make the new
> things look like nails to suit his old hammer. e.g. I've seen
> Postscript code (a stack-oriented language) written in a very C-like
> style. (C is imperative, (local) variable-based.)
>

Did you observe any influence of the programmers native tongue to the
programming style, (except identifyer naming, of course)?

>
> >>> I think "better model what's on the programmer's mind" is more a
> >>> pragmatic than a semantic concept.
> >>
> >> I remain unconvinced that, in the context of the properties of
> >> computer languages, "what's on the programmer's mind" is a
> >> concept worth making a model of, or even possible to make a
> >> useful model of. Is "what's on the programmer's mind" really
> >> consistent and predictable enough to even be meaningfully
> >> modeled?
>
> Joachim> That's what the programmer does when he designs his
> Joachim> program.
>
> Yes. A person who has no experience with a stack-oriented language
> (e.g. Forth, Postscript), for instance, would write Postscript code in a
> very C-like style. He would not natively use the stack (or even think
> about it). He would try to immitate local variables by using a new
> dictionary. etc.
>

Did you observe that speakers of an SOV language (e.g., Japanese) feel more
at home with RPN languages like Forth and Postscript than speakers of an
SVO language?

Joachim

LEE Sau Dan

unread,
Nov 8, 2009, 10:25:47 AM11/8/09
to
>>>>> "Joachim" == Joachim Pense <sn...@pense-mainz.eu> writes:

Joachim> Did you observe any influence of the programmers native
Joachim> tongue to the programming style, (except identifyer naming,
Joachim> of course)?

Maybe, in the naming and ordering of arguments to a C++/Java method?
e.g.

obj1.greaterThan(obj2);

or the ordering of the clauses in SQL:

SELECT cols... FROM table1, table2 WHERE cond...

as opposed to relationa algebra:

project_{cols...}(select_{cond...}(table1 JOIN table2 JOIN ...))


SQL is designed apparently designed by English speakers, because the
ordering of the clauses seem to agree with an English statement. SQL
programmers are forced to write SELECT statements this way, whether they
like that clause order or not.


Joachim> Did you observe that speakers of an SOV language (e.g.,
Joachim> Japanese) feel more at home with RPN languages like Forth
Joachim> and Postscript than speakers of an SVO language?

I've heard that they feel more at home with Postscript and Forth.

Oliver Cromm

unread,
Nov 9, 2009, 6:02:48 PM11/9/09
to
* Herman Rubin <hru...@odds.stat.purdue.edu> wrote:

> In article <hd32i9$ojj$02$1...@news.t-online.com>,
> Joachim Pense <sn...@pense-mainz.eu> wrote:

>>The following lines of Perl all do the same thing but are pragmatically
>>different:
>
>>if ($a != 1) {$b = 17}
>
>>unless ($a == 1) {$b = 17}
>
>>$b = 17 unless $a == 1
>
>>$a == 1 or $b = 17
>
>>$a != 1 and $b = 17
>
> I am afraid I cannot see any difference in these,
> and the same would be the case if someone had a
> reasonable first course, such as should be taught
> in primary school, in "mathematical logic".

I heard of a company whose programming style guide forbid "unless" (at
least in certain constructs), because it is "difficult" to some
programmers.

"Maintainable code" is very important to many organizations today. Under
this aspect, the following are also different (and the second much
better style):

(1)
bg = "1"

(2)
GREY = 1
...
background_color = GREY


--
� liezen sich die man schouwen
�ne gugel vor den frouwen,
nu siht mans in den gugeln g�n
vor den frouwen als ein man, -- TEICHNER

DKleinecke

unread,
Nov 9, 2009, 8:34:28 PM11/9/09
to
On Nov 9, 3:02 pm, Oliver Cromm <lispamat...@yahoo.de> wrote:
> * Herman Rubin <hru...@odds.stat.purdue.edu> wrote:
>
>
>
> > In article <hd32i9$ojj$0...@news.t-online.com>,
> ê liezen sich die man schouwen
> âne gugel vor den frouwen,
> nu siht mans in den gugeln gân

> vor den frouwen als ein man,  --  TEICHNER

Big Can of Worms. Fortunately out of bounds on sci.lang.

Context makes all the difference in the world. If you have been
fixating on the background color then 'bg' is better. Even if you end
up with a
background_color = bg.

You should be using a compiler smart enough the optimize the
difference out.

How come not background.color?

I feel sure that there are lots of studies out there showing that long
words impede comprehension.
I know it is true in my case.

LEE Sau Dan

unread,
Nov 10, 2009, 9:13:16 AM11/10/09
to
>>>>> "Oliver" == Oliver Cromm <lispa...@yahoo.de> writes:

Oliver> I heard of a company whose programming style guide forbid
Oliver> "unless" (at least in certain constructs), because it is
Oliver> "difficult" to some programmers.

They should fire such incompetent programmers instead.

If a "programmer" cannot even handle such simple logical equivalents
(nor the deMorgan's law), how can you trust that he could code execution
logics correctly?


Oliver> "Maintainable code" is very important to many organizations
Oliver> today. Under this aspect, the following are also different
Oliver> (and the second much better style):

Oliver> (1) bg = "1"

Oliver> (2) GREY = 1 ... background_color = GREY

So, those who naively thinks that these are "equivalent" should think
again. Those who naively assumes that program codes are written for
computers only and not for human readers should realize how ignorant
they are.

Helmut Wollmersdorfer

unread,
Nov 10, 2009, 11:04:24 AM11/10/09
to
LEE Sau Dan wrote:
>>>>>> "Oliver" == Oliver Cromm <lispa...@yahoo.de> writes:
>
> Oliver> I heard of a company whose programming style guide forbid
> Oliver> "unless" (at least in certain constructs), because it is
> Oliver> "difficult" to some programmers.

> They should fire such incompetent programmers instead.

No, I would fire a programmer who ignores coding guidelines.

> If a "programmer" cannot even handle such simple logical equivalents
> (nor the deMorgan's law), how can you trust that he could code execution
> logics correctly?

You can read in "Perl Best Practises", pp. 96, why "unless" and "until"
should not be used. Coding guidelines define a sort of 'controlled
language', 'restricted language' for better readability and
maintainability.

Helmut Wollmersdorfer

António Marques

unread,
Nov 11, 2009, 12:52:55 PM11/11/09
to

Words (in this case identifiers) should be as long/complex as needed and
not a bit longer/more-complex.
But how do you explain this to the dumb guy next room??

Peter T. Daniels

unread,
Nov 11, 2009, 2:11:19 PM11/11/09
to
> But how do you explain this to the dumb guy next room??-

You're still talking about computer "languages," right? In real
language, you need to allow for redundancy to counteract noise and
inattention.

António Marques

unread,
Nov 11, 2009, 2:39:16 PM11/11/09
to

'As needed' does wonders.
Thw whole point is that there is a level beyond which verboseness ceases
to improve communication and becomes a distraction.

DKleinecke

unread,
Nov 11, 2009, 9:55:47 PM11/11/09
to
On Nov 11, 11:11 am, "Peter T. Daniels" <gramma...@verizon.net> wrote:

> You're still talking about computer "languages," right? In real
> language, you need to allow for redundancy to counteract noise and
> inattention.

Speaking for myself, but suspecting i have a lot of company, I simply
cannot follow long strings of words put together in a complex fashion.
It doesn't matter what the words are about or whether the matter
interests me or not. My mind simply stops hearing speech and hears
nothing but noise.

In a private conversation I can put up my hand and say "Hold it, too
many words". Listening to a speaker is impossible for me unless the
speaker can break the sonorous flow of beautiful speech into nuggets.
I hardly ever went to lectures when I was in school. Or sermons.

I can cope better with written verbosity because I can absorb it at my
own pace.

Redundancy can be over-redone.

Peter T. Daniels

unread,
Nov 11, 2009, 10:37:51 PM11/11/09
to
On Nov 11, 9:55 pm, DKleinecke <dkleine...@gmail.com> wrote:
> On Nov 11, 11:11 am, "Peter T. Daniels" <gramma...@verizon.net> wrote:
>
> > You're still talking about computer "languages," right? In real
> > language, you need to allow for redundancy to counteract noise and
> > inattention.
>
> Speaking for myself, but suspecting i have a lot of company, I simply
> cannot follow long strings of words put together in a complex fashion.
> It doesn't matter what the words are about or whether the matter
> interests me or not. My mind simply stops hearing speech and hears
> nothing but noise.

I take it you've never gone to see *Waiting for Godot*.

> In a private conversation I can put up my hand and say "Hold it, too
> many words". Listening to a speaker is impossible for me unless the
> speaker can break the sonorous flow of beautiful speech into nuggets.
> I hardly ever went to lectures when I was in school.  Or sermons.

Gene Gragg never uses sentence-final intonation -- but he also never
minds being interrupted during a "lecture." Eric Hamp never comes to
the end of a sentence -- but he uses hesitation noises to attempt to
never yield the floor.

All speech comes in "nuggets." They're called "breath groups."

DKleinecke

unread,
Nov 12, 2009, 8:38:49 PM11/12/09
to

Common on. You know more about rhetoric than that.

Breath groups are not big enough breaks. Listen to an amateur speaker
reading a prepared speech. They go on breathing through what sounds
like monodrone.

Good speakers - television evangelists for example - know to make
frequent breaks. Move around the stage - pause for applause (a
hallelujah perhaps) etc.

And I cannot imagine why I would ever subject myself to "Waiting for
Godot".

Peter T. Daniels

unread,
Nov 12, 2009, 10:51:34 PM11/12/09
to
> Godot".-

_I_ went to it because I'd heard a lot about it and my acquaintance
Chris Reeve was in it. (The only time I saw him in a play at Cornell.)
Would've liked to see it this season on Broadway with Nathan Lane and
Bill Irwin, but who has that kind of money?

Why would you _not_ "subject yourself" to it?

DKleinecke

unread,
Nov 13, 2009, 8:02:42 PM11/13/09
to

I am not a masochist.

Peter T. Daniels

unread,
Nov 13, 2009, 10:27:53 PM11/13/09
to

> I am not a masochist.-

Explain yourself. What is "masochistic" about attending a performance
of *Watiing for Godot*?

I gather from the above that you have never seen it. So what do you
know about it?

DKleinecke

unread,
Nov 14, 2009, 7:42:17 PM11/14/09
to

I don't have to know much about something before I know I want no part
of it. I don't know much about sky-diving but I want no part of it. I
don't need to know much about a movie before I decide I don't want to
watch. "Waiting for Godot" falls into that category.

When I channel surf the TV I can decide in a couple of seconds most of
the time whether i want to stay and watch. Usually I find nothing and
end up watching a soccer game. Soccer remains a mystery to me - I know
what the goal is but why do the players do what they do to achieve
that goal? Every time I watch I think I might get some insight if I
just hang in a little longer.

I'm not much into being amused by other people's performances. I
prefer doing something.

Richard Herring

unread,
Nov 16, 2009, 5:07:20 AM11/16/09
to
In message
<463d566e-1c20-4db3...@r24g2000prf.googlegroups.com>,
DKleinecke <dklei...@gmail.com> writes

> Soccer remains a mystery to me - I know
>what the goal is

It's that rectangular frame at each end of the pitch (BTW your
understanding may improve if you note that there are two of them) ;-)

>but why do the players do what they do to achieve
>that goal?

Because of the offside rule.

>Every time I watch I think I might get some insight if I
>just hang in a little longer.
>

You won't. Nobody understands the offside rule.

>I'm not much into being amused by other people's performances. I
>prefer doing something.

--
Richard Herring

Joachim Pense

unread,
Nov 16, 2009, 1:08:01 PM11/16/09
to
Richard Herring (in sci.lang):

Try explaining the offside rule to your wife.

Joachim

Richard Herring

unread,
Nov 17, 2009, 5:42:18 AM11/17/09
to
In message <hds47h$lrj$01$1...@news.t-online.com>, Joachim Pense
<sn...@pense-mainz.eu> writes
I can't even explain it to *myself*.

--
Richard Herring

Message has been deleted
0 new messages