Function definition

Aaron J. Seigo aseigo at kde.org
Sat Jul 26 13:50:22 UTC 2014


On Saturday, July 26, 2014 09:12:33 Jay Woods wrote:
> It would be handy to have a switch that can be turned on and off around
> some dicey piece of code. The switch would be for the
> "stream-of-consciousness" mode. Have the compiler tell you what is going on
> rather than having a bunch of code to do the same. After all, with a
> switch, it all goes away when you understand and act on what is happening.

Erlang has a couple interesting modes with its compiler. Depending on what you 
pass to the compile command it will generate:

* "common Erlang" which is an intermediate language complete with let 
statements and an extremely pedantic, but equally clear, syntax that would 
make even LISP blush (this is what languages like Elixir get mutated into 
before getting processed further)
* beam (Erlang's VM) assembler
* bytecode that is ready to be run on the VM

It's a neat approach.

Thought perhaps I'm thinking of something different than you here ... what sort 
of output from the compiler would you be looking for? What kind of "dicey 
code" do you have in mind?

-- 
Aaron J. Seigo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://kde.org/pipermail/funq-devel/attachments/20140726/ae21c922/attachment.sig>


More information about the Funq-devel mailing list