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

Re: C# is not Dylan (was: Re: C# : The new language from M$)



Argh. Syntax semantics? Is that a valid phrase?

I meant that within the language syntax you have markers for beginning and
ending blocks, blocks are scopes, and lines generally end with an end of
line marker. I know this sounds trivial, but the fuss people make over
syntax tends to obscure this.

So, despite having each others' programmers reaching for their Red Books,
these are equivalent:

// C

void klin()
{
    if( true )
    {
        exit( 0 );
    }
}

// Dylan

define method blim()
    if( #t )
        exit( 0 );
    end if;
end method blim;

Whilst the Dylan takes more typing (in this hyper-correct form), you get
better documented code and you don't have to start blocks twice as you do in
curly-bracket langauges.

You are right that the examples were entirely syntax, this was what I meant.

- Rob.


> From: Lyman Taylor <lyman.taylor@mindspring.com>
> Subject: Re: C# is not Dylan (was: Re: C# : The new language from M$)
> 
> Rob Myers wrote:
> ...
>> .... but the
>> semantics are pretty similar.
> 
> Huh???
> 
> The presented code fragments were almost entirely "syntax", IMHO.
> The "last expression, function's value" sematics are matched in
> dylan and lisp whereas the C requires explicit control change.



References: