erlang
Dynamic variables hack in Erlang
Posted January 31st, 2008 by bardOne thing that jumps to the eye in functional code sources is longer-than-usual argument lists.
process(Tree, Env, Plugins, Config, ...).
It's easy to see that as a consequence of functions using arguments as sole
input channel. (Global -define()'s
don't qualify as input channels—they can't vary at runtime, arguments can.)
Usually it's no big hassle.
Literal XML in Erlang with parse_transform/2
Posted June 26th, 2007 by bardOne of the things I dislike about Erlang is that it severely impairs bragging opportunities. Yesterday I wrote a module that allows writing literal XML in the source and have it parsed into Erlang structures at compile time—sort of like E4X minus the manipulation goodies at runtime (at least for now).
You write:
Doc = '<greeting>Hello!</greeting>',
io:format("~p~n", [Doc]).
And it prints…
Comments
1 day 18 hours ago
1 day 18 hours ago
2 days 3 hours ago
2 days 7 hours ago
2 days 17 hours ago
3 days 10 hours ago
4 days 10 hours ago
1 week 2 days ago
2 weeks 1 day ago
4 weeks 6 days ago