[comp.software-eng] Question on programming languages

billh@hplsla.HP.COM (Bill Harris) (09/23/89)

I am curious: does anyone know of any computer languages that have been
implemented whose keywords are based on some language other than English?
If so, can you provide any details?  This could conceivably include
"standard" languages such as Pascal or C which may have been "translated".

Thanks,

Bill Harris

billh%hplsla@hplabs.hp.com

frode@m2cs.uu.no (Frode Odegard) (09/24/89)

billh@hplsla.HP.COM (Bill Harris) writes:

>I am curious: does anyone know of any computer languages that have been
>implemented whose keywords are based on some language other than English?
>If so, can you provide any details?  This could conceivably include
>"standard" languages such as Pascal or C which may have been "translated".

I read about a Norwegian Logo once ;-)  Hmm...contact AFNOR, the French
standards body (try the French embassy/consulate for an addr.). They've done
a French Pascal and I believe they will do a French Modula as well.

I have a 10-year-old kid sister I want to introduce to programming (this
is in Norway) so keep me posted :-)

			- Frode

-- 
_____________________________________________________________________
Frode L. Odegard, Modula-2 CASE Systems, Maridalsveien 139, N-0461
OSLO 4, NORWAY. Email: frode@m2cs.uu.no. For a full resume send mail
to info@m2cs.uu.no (message must contain the command "resume frode").

ok@cs.mu.oz.au (Richard O'Keefe) (09/24/89)

In article <1989Sep24.055713.226@m2cs.uu.no>, frode@m2cs.uu.no (Frode Odegard) writes:
: billh@hplsla.HP.COM (Bill Harris) writes:
: >I am curious: does anyone know of any computer languages that have been
: >implemented whose keywords are based on some language other than English?

: [AFNOR] They've done
: a French Pascal and I believe they will do a French Modula as well.

There was a French version of Algol 60.

The >first< Prolog from Marseilles had all its built in predicates
(no keywords in Prolog syntax) in French.  This may be the best known
programming language that _started out_ in a language other than English.

UH2@PSUVM.BITNET (Lee Sailer) (09/25/89)

I've seen one.  Years ago I saw some source code which I believe
was ALGOL, except that all the Keywords were auf Deutsch, eg,

wenn x > 1 dann z := 0;
fur i := 1 zu 10 tun z := z + a[i];

und so weiter.

Seems like this would be pretty easy to do if you had the source
to the translater, or using a simple preprocessor for a compiled
language.

Also, in DEC-10 SIMULA, all of the error messages were in ASCII files,
so that they could be easily replaced with ones in another language,
and there was a compiler switch that added some Swedish and Norwegian
characters to the list of characters allowed in variable names.

eugene@eos.UUCP (Eugene Miya) (09/26/89)

I've seen lots of code in other natural languages.

The neatest example was in a TR sent to Stanford some years back from
Germnay.  It had lots of C and troff macros (comments and macros based)
in German.  Kinda neat.

Consider Fortran and Cobol written in some Indian dialects.

WHen I was sitting on the Pascal Standards Committee,
it was noted that many of our problems came from the French.
So if you want to investigate new languages seek out the French.
Consider languages such as Lau.

Remember: keywords alone, do not a programming language make.

Another gross generalization from

--eugene miya, NASA Ames Research Center, eugene@aurora.arc.nasa.gov
  resident cynic at the Rock of Ages Home for Retired Hackers:
  "You trust the `reply' command with all those different mailers out there?"
  "If my mail does not reach you, please accept my apology."
  {ncar,decwrl,hplabs,uunet}!ames!eugene
  				Live free or die.

rcd@ico.ISC.COM (Dick Dunn) (09/26/89)

The question was whether there are programming languages based on some
language other than English, e.g. with keywords in some other language.
In article <89267.181118UH2@PSUVM.BITNET>, UH2@PSUVM.BITNET (Lee Sailer) writes:
> I've seen one.  Years ago I saw some source code which I believe
> was ALGOL, except that all the Keywords were auf Deutsch...
. . .[example deleted]
> Seems like this would be pretty easy to do if you had the source
> to the translater, or using a simple preprocessor for a compiled
> language.

You can modify the translator easily enough, but you end up with a
different language because (for most languages) you can't do a simple
translation without getting into trouble.  The problem is that the key-
words, when translated, may collide with identifiers in the program--
which is a problem in most languages.  (And if you look for identifier
collisions and remap them, you'll mess up the comments, etc.)

The reason that virtually all programming languages use English for
keywords is simply to have one standard representation for programs.
Trying to allow multiple languages gets you into portability problems.
The anglo-centric view--like it or not, it's there--says that a language
using keywords other than English doesn't stand a chance outside its own
country.
-- 
Dick Dunn     rcd@ico.isc.com    uucp: {ncar,nbires}!ico!rcd     (303)449-2870
   ...I'm not cynical - just experienced.

sdm@hprnd.HP.COM (Steven Mueller) (09/26/89)

In 'C' you can use the preprocessor macros to re-define the keywords.  For
example you could use a header file to contain lines such as:

#define  yashchou   for
#define  buquait    while
#define  dontdo     goto

And use the forign words in your programs.  Of course, the original English
keywords will still be keywords.

sra@ecs.soton.ac.uk (Stephen Adams) (09/26/89)

In article <16126@vail.ICO.ISC.COM> rcd@ico.ISC.COM (Dick Dunn) writes:

   The reason that virtually all programming languages use English for
   keywords is simply to have one standard representation for programs.
   Trying to allow multiple languages gets you into portability problems.
   The anglo-centric view--like it or not, it's there--says that a language
   using keywords other than English doesn't stand a chance outside its own
   country.

I know a couple of programmers who program in COBOL for a living and
are glad that they dont have english as their first language.  They
rarely pick a variable name only to find that it is one of COBOLs
hundreds of reserved words :-).
--
Stephen Adams
S.Adams@ecs.soton.ac.uk

rwex@IDA.ORG (Richard Wexelblat) (09/26/89)

In article <5219@eos.UUCP> eugene@eos.UUCP (Eugene Miya) writes:
>I've seen lots of code in other natural languages.
>

In a very early SIGPLAN Notices there were some examples of Japanese
COBOL programs -- all of the keywords in English, all variables on
Romanji Japanese.

The first ALGOL compiler I used was implemented at the U. of Grenoble.
All "regular" keywords in English but all I/O statements in French (lire
& ecrire, etc.)

A long while ago there were some publications relating to the
impossibility of translating the LOGO programming language into a
romance language without seriously changing its structure.  (A basic
aspect of Logo is that the infinitive form of an English verb -- used to
define a function/procedure (TO DRAW, e.g.) -- is lexically identical
with the imperative form -- used to invoke the function (DRAW, e.g.).
Try doing that in French.)


-- 
--Dick Wexelblat  |I must create a System or be enslav'd by another Man's; |
  (rwex@ida.org)  |I will not Reason and Compare: my business is to Create.|
  703  824  5511  |   -Blake,  Jerusalem                                   |

hallett@positron.uucp (Jeff Hallett x5163 ) (09/27/89)

In article <8720001@hplsla.HP.COM> billh@hplsla.HP.COM (Bill Harris) writes:
>I am curious: does anyone know of any computer languages that have been
>implemented whose keywords are based on some language other than English?

APL, the write-only language.

:^) :^) :^) :^) :^) :^) :^) :^) :^) :^) :^) :^) :^) :^) :^) :^) :^)


f
o
d
d
e
r


--
	     Jeffrey A. Hallett, PET Software Engineering
      GE Medical Systems, W641, PO Box 414, Milwaukee, WI  53201
	    (414) 548-5163 : EMAIL -  hallett@gemed.ge.com
     "Your logic was impeccable Captain. We are in grave danger."

bernhold@qtp.ufl.edu (David E. Bernholdt) (09/28/89)

In article <SRA.89Sep26104518@mccarthy.ecs.soton.ac.uk> sra@ecs.soton.ac.uk (Stephen Adams) writes:
>I know a couple of programmers who program in COBOL for a living and
>are glad that they dont have english as their first language.  They
>rarely pick a variable name only to find that it is one of COBOLs
>hundreds of reserved words :-).

All questions of "proper" programming style, etc. aside, here's my
encounter with multi-lingual programmers:

A few years ago, I had need of a Fortran program which had last been
worked on by a native Japenese who was a post-doc in my research
group.  The original code was not well documented.  The postdoc had
made some modifications and the comments he put in were in Japanese
(transliterated to the ASCII alphabet -- I guess they call that
romanji?).  Luckily, I happened to know someone who could translate
them for me.  Interestingly, most of the variables he added, etc. were
reasonably mnemonic to English.
-- 
David Bernholdt			bernhold@qtp.ufl.edu
Quantum Theory Project		bernhold@ufpine.bitnet
University of Florida
Gainesville, FL  32611		904/392 6365

PAAAAAR@CALSTATE.BITNET (09/28/89)

Computer Weekly Europe - years Ago in th UK -
once published a Pascal  or Algol 60 program with Japanese
key words - it was not immediately clear which language it was.

Also - ALGOL 60 had one French predefined identifier - 'entier'.

You might say that APL has a lot of non-English
(Un-Natural?) symbols.

Dick Botting,
Department Computer Science,
5500 State University Parkway,
California State University, San Bernardino, CA 92407

PAAAAAR@CCS.CSUSCC.CALSTATE
paaaaar@calstate.bitnet
PAAAAAR%CALSTATE.BITNET@CUNYVM.CUNY.EDU

"where smog of LA, is blown away, and the sun shines bright all the day"!

fad@kulla (Franklin A Davis) (09/30/89)

In article <3580002@hprnd.HP.COM> sdm@hprnd.HP.COM (Steven Mueller) writes:
>In 'C' you can use the preprocessor macros to re-define the keywords.  

A funny example of this just made the rounds here.

--Franklin


From: schooler@venera.isi.edu
Date: Tue, 25 Jul 89 18:12:57 -0700
Subject: california codin'

Just wanted to check out that you gnarly dudes are using the latest and
greatest software technology fer yer rad code to make it easy for the dudes who
have to read it.  The hip new way to write readable C code involves the use of
a few simple defines.


#define like {
#define man ;}
#define an ;
#define SayBro /*
#define CheckItOut */


SayBro like, this is some rad shit, so CheckItOut

like
    a = b
         an
    c = d
man

SayBro , like who needs help from them compiler choads anyway?
THIS is the way to write CLEAR code.  I mean really!  CheckItOut

like SayBro this is ShellSort straight out of the white book, but in
a readable form.

CheckItOut man

#define YoDude for(
#define OK     )
#define is     =
#define AND    &&
#define as
#define Do
#define long
#define some
#define make
#define shit
#define FAROUT

shell(v, n) SayBro sort v[0]...v[n-1] into increasing order CheckItOut
int v[], n;

like int gap, i, j, temp;

YoDude gap is n/2 an as long as gap > 0 Do some shit an make gap /=2 OK
    YoDude i is gap an as long as i < n Do some shit an make i++ OK
        YoDude j is i - gap an as long as j >= 0 AND v[j] > v[j+gap] Do some
            shit an make j -= gap OK
            like
                temp is v[j]      an
                v[j] is v[j+gap]  an
                v[j+gap] is temp
            man
FAROUT man

SayBro like, B there OB square!  CheckItOut




  franklin a davis  Thinking Machines Corp. Cambridge, MA 02142   617-876-1111
  <fad@think.com>   {ames, harvard, mit-eddie, uunet}!think!fad 
				Let the four winds blow you safely home!

diamond@csl.sony.co.jp (Norman Diamond) (10/02/89)

In article <30431@news.Think.COM> fad@think.com (Franklin A Davis) writes:

>#define SayBro /*
>#define CheckItOut */
>  ...
>SayBro like, this is some rad shit, so CheckItOut
>  ...

Like wow man.  But.

#define OhShit Unfortunately
/* OhShit, under ANSI C, this will NOT BE ALLOWED TO WORK!!!!!!!! */

Under ANSI C, each comment is changed into a single space before
preprocessor directives and macro replacements are performed.
So, "/* <newline> #define CheckItOut */" gets zapped.

Furthermore, if you manage to construct a macro "SayBro" which changes
into "/*"  (which is possible to do), then the "/*" hangs around in
the post-preprocessed code.  So it turns into a divide operator followed
by an indirection operator.  You can't win.

-- 
Norman Diamond, Sony Corp. (diamond%ws.sony.junet@uunet.uu.net seems to work)
  The above opinions are inherited by your machine's init process (pid 1),
  after being disowned and orphaned.  However, if you see this at Waterloo or
  Anterior, then their administrators must have approved of these opinions.

torkil@psivax.UUCP (Torkil Hammer) (10/03/89)

In article <1989Sep26.114433.515@IDA.ORG> rwex@IDA.ORG.UUCP (Richard Wexelblat) writes:
#
#The first ALGOL compiler I used was implemented at the U. of Grenoble.
#All "regular" keywords in English but all I/O statements in French (lire
#& ecrire, etc.)
#
Because Algol was designed as a publication language.  The idea was that
if some guy figured a really smart and reasonable machine independent
way of coding a math function (in local assembler, of course) he could
rewrite the algorithm into an international language, publish it in
BIT (or whatever) and some other guy across the ocean could pick it up
and recode it by hand for his local machine.

The publication language was Algol.  If you look at its definition, you
will find that it is truly portable - independent of any implementation.
Since I/O is implementation-only it is not needed and was not defined in
Algol.

Later, some wise guy figured out that if a human can translate accurate
and fully defined info into machine code so can a program - and the
concept of a true compiler was born.  I/O was left as an exercise
for the local gurus, and in the spirit of the 1950's it was done in
local natural language including local national alphabetic characters.
"skrvtekst", "tryktekst" and "l}stekst" come to mind.

In 1968 Algol became completely defined as a computer language,
with standard character set and standard reserved names.  The publication
history still lingers.  The syntax is free from any forethoughts on how
to parse it on a computer.  Data definitions are bitless and do not reflect
whether calculations are to be done on a digital or analog computing
device, and no assumptions are made about Algol compilers.

Torkil Hammer

john@nmtsun.nmt.edu (John Shipman) (10/04/89)

First, Bill Harris (billh@hplsla.HP.COM) wrote:
+---
| I am curious: does anyone know of any computer languages
| that have been implemented whose keywords are based on
| some language other than English?
+---

Then, Jeffrey A. Hallett (hallett@gemed.ge.com) replied:
+---
| APL, the write-only language. (17 smileys omitted)
+---

This may have been intended as a wisecrack, but there may be
an element of truth to it.  As I understand it, Ken Iverson
thought it was rather ethnocentric to use English keywords
for his operators.  He used pictorial symbols in hopes of
making the language more universally accepted.  A bit
ironic, neh?
-- 
John Shipman/Zoological Data Processing/Socorro, New Mexico
USENET: ucbvax!unmvax!nmtsun!john  CSNET: john@nmtsun.nmt.edu ``A lesson from
past over-machined societies...the devices themselves condition the users to
employ each other the way they employ machines.'' --Frank Herbert