Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.compilers > #402
| From | tm <thomas.mertes@gmx.at> |
|---|---|
| Newsgroups | comp.compilers |
| Subject | Re: Looking for volunteers for XL |
| Date | 2012-01-03 09:28 -0800 |
| Organization | Compilers Central |
| Message-ID | <12-01-003@comp.compilers> (permalink) |
| References | <11-11-048@comp.compilers> <11-11-053@comp.compilers> <11-11-054@comp.compilers> <11-11-058@comp.compilers> <11-11-060@comp.compilers> |
On Nov 27 2011, 11:24 pm, "BartC" <b...@freeuk.com> wrote:
> A self-extensible language sounds like a good idea and might well
> work. I admit I've never used one ...
Really?
AFAIK you tried Seed7 a little bit (Thank you four your
fannkuch-redux benchmark program). So you tied an extensible
language without noticing that it is extensible. :-)
> (although I did play with designing
> one once, then gave up),
The trick is: You need to restrict the possibilities somehow to
"reasonable" features. I know that this depends on the point of
view...
> and have no idea what is and isn't possible;
> could you create a language that has C syntax for example, then add in
> a few Cobol-like statements or APL expressions?
Funny, such things were the original idea, which lead to Seed7.
Later I found that some restrictions really make sense. BTW:
Seed7 could do this, when APL operators are restricted to ASCII. :-)
The braces of C would conflict with existing braces in the
predefined Seed7 language (Seed7 uses them to define set literals).
So some of the existing Seed7 definitions need to be omitted, which
I did for the following example. The example defines a
C if-statement:
$ include "seed7x_05.s7i";
# Define the syntax of a simple C if-statment:
$ syntax expr: .if.().{.().} is -> 25;
# Define the semantic of a simple C if-statement:
const proc: if (in boolean: cond) {
(in proc: statement)
} is func
begin
if cond then
statement;
end if;
end func;
const proc: main is func
begin
# Use the C if-statement:
if (TRUE) {
writeln("okay");
}
end func;
I left out COBOL and APL, but you should see the principle.
BTW: I don't think that such a brutal mix of language features
(C, COBOL, APL) makes sense.
> Or is the syntax it's
> capable of rather more limited?
Seed7 is not overengineered, and other extensible languages should
also avoid this pitfall.
Greetings Thomas Mertes
--
Seed7 Homepage: http://seed7.sourceforge.net
Seed7 - The extensible programming language: User defined statements
and operators, abstract data types, templates without special
syntax, OO with interfaces and multiple dispatch, statically typed,
interpreted or compiled, portable, runs under linux/unix/windows.
Back to comp.compilers | Previous | Next — Previous in thread | Next in thread | Find similar
Looking for volunteers for XL Christophe de Dinechin <christophe@taodyne.com> - 2011-11-22 21:03 -0800
Re: Looking for volunteers for XL Kaz Kylheku <kaz@kylheku.com> - 2011-11-26 05:43 +0000
Re: Looking for volunteers for XL Christophe de Dinechin <christophe@taodyne.com> - 2011-11-26 12:38 -0800
Re: Looking for volunteers for XL "BartC" <bc@freeuk.com> - 2011-11-26 23:19 +0000
Re: Looking for volunteers for XL Christophe de Dinechin <christophe@taodyne.com> - 2011-11-27 12:34 -0800
Re: Looking for volunteers for XL "BartC" <bc@freeuk.com> - 2011-11-27 22:24 +0000
Re: Looking for volunteers for XL Christophe de Dinechin <christophe@taodyne.com> - 2011-11-28 14:12 -0800
Re: Looking for volunteers for XL ardjussi <jussi.santti@ard.fi> - 2011-11-30 13:16 -0800
Re: Looking for volunteers for XL Kaz Kylheku <kaz@kylheku.com> - 2011-12-01 05:44 +0000
Re: overloading, was Looking for volunteers for XL glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2011-12-02 05:36 +0000
Re: Looking for volunteers for XL tm <thomas.mertes@gmx.at> - 2012-01-03 09:28 -0800
Re: Looking for volunteers for XL Kaz Kylheku <kaz@kylheku.com> - 2011-11-28 04:45 +0000
Re: Looking for volunteers for XL Timothy Knox <tdk@thelbane.com> - 2011-11-27 22:50 -0800
Re: Looking for volunteers for XL Alex McDonald <blog@rivadpm.com> - 2011-12-01 12:11 -0800
Re: Looking for volunteers for XL "BartC" <bc@freeuk.com> - 2011-11-28 10:23 +0000
Re: Looking for volunteers for XL glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2011-11-29 07:37 +0000
Re: macros, Looking for volunteers for XL Gene Wirchenko <genew@ocis.net> - 2011-12-03 17:36 -0800
Re: macros, Looking for volunteers for XL glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2011-12-05 04:24 +0000
Re: Looking for volunteers for XL Kaz Kylheku <kaz@kylheku.com> - 2011-12-01 05:35 +0000
Re: designing language extensions, was Looking for volunteers for XL Marco van de Voort <marcov@toad.stack.nl> - 2011-12-03 13:02 +0000
Re: Looking for volunteers for XL jgk@panix.com (Joe keane) - 2011-12-13 00:08 +0000
Re: macros, was Looking for volunteers for XL Kaz Kylheku <kaz@kylheku.com> - 2011-12-13 01:39 +0000
Re: macros, was Looking for volunteers for XL Kaz Kylheku <kaz@kylheku.com> - 2011-12-14 19:00 +0000
Re: macros, was Looking for volunteers for XL jgk@panix.com (Joe keane) - 2011-12-15 15:40 +0000
Re: macros, was Looking for volunteers for XL Kaz Kylheku <kaz@kylheku.com> - 2011-12-16 17:48 +0000
Re: Looking for volunteers for XL glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2011-11-28 10:26 +0000
csiph-web