[Prev][Next][Index][Thread]

Re: Does my ideal language exist?



Once you get used to returning multiple values, return structs look very
awkward. I converted a toy XML parser from JavaScript to Dylan a while back,
and the JavaScript version was built around some sort of current data /
remaining data struct that really obfuscated the code. In Dylan, each
function could just return the values required, and the code made a lot more
sense and wasted less memory.

Out-parameter pointers are one of the main causes of const. const looks like
a good idea, but it's a side effect of that broken paradigm and a real pain
to maintain.

On the subject of goto, Apple's C sample code tends to use goto blocks as
finally: clauses in functions. This works quite well, and avoids deeply
nested ifs simply for error handling.

- Rob.

-- 


> From: Bruce Hoult <bruce@hoult.org>
> Organization: The Internet Group Ltd
> Date: Tue, 27 Jun 2000 20:30:01 -0400 (EDT)
> To: info-dylan@ai.mit.edu
> Subject: Re: Does my ideal language exist?
> 
> In article <qDb65.392$o7.116882@news.uswest.net>, "Jeff Massung"
> <jmassung@magpiesystems.com> wrote:
> 
>> As for "multiple left hand arguments", There really is not
>> reason for it in many languages. C for example - just return
>> a structure or pass the return values as pointers to the
>> function.
> 
> Neither is a good solution.



References: