[erlang-questions] Funargs: Ruby-like blocks for Erlang

Richard O'Keefe ok@REDACTED
Fri Jul 22 01:19:15 CEST 2011


On 22/07/2011, at 2:29 AM, Dhananjay Nene wrote:

> On Thu, Jul 21, 2011 at 1:24 PM, Tony Arcieri <tony.arcieri@REDACTED> wrote:
>>> And voila, you have a fairly decent DSL for building XML from Erlang.
>> 
>> For comparison, here's the hypothetical XML "DSL" in regular Erlang
>> syntax versus the block form:
>> 
>> https://gist.github.com/1096754
> 
> I couldn't but help being reminded of
> http://redmine.ruby-lang.org/issues/5054 when reading the gist of
> either version :) :)

BCPL:
	$(tag $( $( $( $( $)tag
PL/I:
	L: do; do; do; do; end L;
Interlisp:
	[foo (bar (ugh (zap]

and that's just three languages I've used that had some way of
abbreviating a lot of "end"s.  Occam, Python, Haskell, and
Clean are four languages that eliminate the ends in the first
place.

This is another example where you cannot patch your way to
improvement, a whole new front end being needed.

(The hErlang example in my previous message looks as though
it relies on indentation, but it doesn't.)




More information about the erlang-questions mailing list