Erlang/OTP Forums

Author Message

<  Erlang questions mailing list  ~  Erlang as "assembler"

vlad.dumitrescu at flashm
Posted: Tue Aug 03, 1999 8:07 pm Reply with quote
Guest
> > How does the thought of
> > using Erlang as a "assembler" language, most like Lisp (and C) are for
> > so many other higher-level languages, sound? Is it an heresy? hope
> > not...
>
> I'm not sure what you're getting at. You'd like to compile other
> languages into Erlang?

Something like that, yes. Not any language, but something more
like a kind of "Erlang++". Let me explain by taking an example:
constraint programming. One can express all constraints and rules
in Erlang, but if an application uses a lot of it, it might be easier to
use and debug if one could extend Erlang, and use a preprocessor
to convert the source into 'clean' Erlang.

One other example might have been the list comprehensions: if the
language did not provide them, someone might use a preprocessor
to 'compile' them into code.

In the latter case, including that into the language is good because
it is a general improvement and it's also faster than using hand-
coded routines. But when the change is specific, of limited use, I
think it makes little sense to include it into the language.

> Erlang is the most wonderfully concise and easy to use language I've had
> the pleasure of programming in.

I completely agree with you!!

My question was in fact addressed to the creators of Erlang. I
know that it might be a touchy question to (more or less) build a
language on top of another - and I don't want to get on their black
list! Wink So I ask first, to find out their thoughts.

note: it is constraint programming that I would like to be able to
express in a cleaner way.

/Vlad


Post generated using Mail2Forum (http://m2f.sourceforge.net)
klacke at bluetail.com
Posted: Tue Aug 03, 1999 9:11 pm Reply with quote
Guest
> in Erlang, but if an application uses a lot of it, it might be easier to
> use and debug if one could extend Erlang, and use a preprocessor
> to convert the source into 'clean' Erlang.

This is not a bad idea at all,


>
> One other example might have been the list comprehensions: if the
> language did not provide them, someone might use a preprocessor
> to 'compile' them into code.
>

And as it happens, list comprehensions are implemented that
way already. lib/compiler/src/sys_pre_expand.erl
This was easy to implement, the drawback is that lc's are
a bit slower that they could be.


> In the latter case, including that into the language is good because
> it is a general improvement and it's also faster than using hand-
> coded routines. But when the change is specific, of limited use, I
> think it makes little sense to include it into the language.
>

We used to discuss a sort of kernel erlang a couple of
years ago, it should a minimalistic language (possibly
imperative) that could be used to compile all kinds of
transformations and language extensions into. It was never
realized though but I still think it was a good idea.


Cheers


/klacke



Post generated using Mail2Forum (http://m2f.sourceforge.net)

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum