[Prev][Next][Index][Thread]
Re: C# is not Dylan (was: Re: C# : The new language from M$)
-
To: info-dylan@ai.mit.edu
-
Subject: Re: C# is not Dylan (was: Re: C# : The new language from M$)
-
From: Bruce Hoult <bruce@hoult.org>
-
Date: Fri, 30 Jun 2000 06:30:02 -0400 (EDT)
-
Organization: The Internet Group Ltd
-
References: <57D01C66CBEFE28E.0140FBE2F42B8951.48F3FDB0A810D9E0@lp.airnews.net> <m3zoo7w69a.fsf@cadet.dsl.speakeasy.net> <huvjls0t6hfio3htr0r1ee3bk57b0th1dr@4ax.com> <c29g0pxbubg.fsf@nerd-xing.mit.edu> <kpamlscdjl89ihfhsdk3d4rinoa1hji78j@4ax.com> <bruce-3485B7.01374830062000@news.akl.ihug.co.nz> <m2u2ebzfyf.fsf@gododdin.internal.jasmine.org.uk>
-
User-Agent: MT-NewsWatcher/3.0 (PPC)
-
Xref: traf.lcs.mit.edu comp.lang.lisp:54058 comp.lang.dylan:12280
In article <m2u2ebzfyf.fsf@gododdin.internal.jasmine.org.uk>, Simon
Brooke <simon@jasmine.org.uk> wrote:
> Bruce Hoult <bruce@hoult.org> writes:
>
> > In article <kpamlscdjl89ihfhsdk3d4rinoa1hji78j@4ax.com>, Jason Trenouth
> > <jason@harlequin.com> wrote:
> >
> > > Well, Dylan really isn't C-ish syntax. No braces (except in macro
> > > definitions), no casting, postfix type declarations, and very
> > > different (Lisp/Scheme-like) identifier conventions. Unfortunately,
> > > from the point of view of promulgating the language, Dylan's syntax
> > > looks very alien to many C programmers.
> >
> > I suspect that the guys tasked with coming up with the infix syntax
> > were
> > concerned that if it looked *too* C-like then people would expect it to
> > have C semantics.
>
> Isn't there also an (alternative) prefix syntax for Dylan? That must
> be even more lisp-like (says Simon, never having tried it).
Oh, absolutely. A lot of simple Scheme textbook programs can be
converted into prefix Dylan simply by doing a global s/lambda/method/
e.g.
(define fact (lambda (n) (if (< n 1) 1 (* n (fact (- n 1)))))) // Scheme
(define fact (method (n) (if (< n 1) 1 (* n (fact (- n 1)))))) // Dylan
Then the differences start. Scheme has a shortcut "(define (fact n) ...
)" whereas Dylan has "(define-method fact (n) ... )". Dylan lets you
replace args in the argument list with (n <integer>) as a type
declaration. Dylan has a built-in object system (and everything is an
object). But they are very, very similar.
But neither current implementation of Dylan supports the prefix syntax.
At all. It's pining for the Fjords. It's an ex-syntax. It's bleedin'
snuffed it.
-- Bruce
References: