www.digitalmars.com         C & C++   DMDScript  

D - Multi-lingual language

reply Carlos <Carlos_member pathlink.com> writes:
Has someone ever thought about writing a multi-lingual language?
For example, including a compiler directive like

language english;

so you use: if, while, do, for, class, ...

and it could be for other languages. So if you write

language spanish;

you would use (respectively): si, mientras, hacer (or something like that), para
(or something like that), clase, ...

By doing that, that programming language (whichever it is) will have more adepts
outside US, Canada, UK, etc. Advantages? More users!

How difficult would it be? The compiler reads "language spanish;" so it sets up
the spanish keywords table and before compiling, translates word-by-word the
program and then compile.

Why has nobody done it before?
May 03 2002
next sibling parent reply "Sean L. Palmer" <spalmer iname.com> writes:
I'm not completely against the idea, but wouldn't this be adequately handled
by a textual preprocessor?

Sean

"Carlos" <Carlos_member pathlink.com> wrote in message
news:aavfdc$i98$1 digitaldaemon.com...
 Has someone ever thought about writing a multi-lingual language?
 For example, including a compiler directive like

 language english;

 so you use: if, while, do, for, class, ...

 and it could be for other languages. So if you write

 language spanish;

 you would use (respectively): si, mientras, hacer (or something like
that), para
 (or something like that), clase, ...

 By doing that, that programming language (whichever it is) will have more
adepts
 outside US, Canada, UK, etc. Advantages? More users!

 How difficult would it be? The compiler reads "language spanish;" so it
sets up
 the spanish keywords table and before compiling, translates word-by-word
the
 program and then compile.

 Why has nobody done it before?
May 03 2002
parent "Nagy Tamas" <microwizard.ax.hu> <"Nagy_member pathlink.com> writes:
Hi Sean,

You are right. Here we are writing (or at least trying) in english, but we have
different mothertongues...

The really nationalized programming languages caused only problems and problems
and ... like Micro$oft macro scripts. They are mistakes.

IMHO it is much harder to use our brains for thinking in logical way (instead of
associative) than learning a new programming language (ex. in hebrew).

It would be nice to have a preprocessor for this purpose, but I am scared about
it's usefulness.

Tamas

In article <aavvpn$12if$1 digitaldaemon.com>, Sean L. Palmer says...
I'm not completely against the idea, but wouldn't this be adequately handled
by a textual preprocessor?

Sean

"Carlos" <Carlos_member pathlink.com> wrote in message
news:aavfdc$i98$1 digitaldaemon.com...
 Has someone ever thought about writing a multi-lingual language?
 ...
 Why has nobody done it before?
Tamas Nagy MicroWizard Ltd. Hungary
May 04 2002
prev sibling parent fasa <tremon_r epita.fr> writes:
 
 Why has nobody done it before?
 
 
Well i am just an average student in computer science and what I have learn lead me to think that having more than one way is a good way to make things is generaly a bad thing... Ill explain it... in big project it s hard enought to understand each other if you start making things youre own way ... over programmers won't be able to understand you easily as they will add first to try to understand which feature of the language you are using .... i hope you get my point (my english is sooo poor) fasa
May 04 2002