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

Re: What?



Wow, that sounds like an interesting language. The syntax in the 
examples almost resembles a mix of C++, Pascal, and BASIC. Strange. But, 
are any big-time applications actually created in this language? I would 
think it would be kind of hard since none of the major operating systems 
have APIs in Dylan.

For example, how would you make Macintosh API calls in this language?

Thanks for the information! I was curious because I have a brother named 
Dylan, and I was just browsing through all the programming language 
newsgroups and I found one for Dylan and I thought I'd check it out.

mw


In article <000f01c24120$53941dd0$9c8bfd3e@wilde>,
 "Jason Trenouth" <jason.trenouth@bigfoot.com> wrote:

> 
> 
> > What is this language? I have never heard of it before.
> 
> One reductionist breakdown might be:
> 
> Dylan = Scheme + CLOS + Smalltalk + Pascal
> 
> Scheme for basic semantics.
> Common Lisp Object System (CLOS) for the object system, and exception
> handling.
> Smalltalk for "objects all the way down".
> Pascal for syntax (ish).
> 
> An oversimplied historical view is that Dylan was Apple's Java. It was an
> attempt to bring some of the power of the Lisp family of languages to
> mainstream programming, by:
> 
>     - rationalizing some historical baggage
>     - dropping some of the more complex/advanced/tangled features
>     - making application/component delivery and deployment easier
>     - adding some syntatic sugar
> 
> > What platforms does it cover?
> 
> It varies by compiler.
> 
> // Example: summing a stream of integers
> 
> define method sum-stream ( stream )
>   let sum = 0;
>   let n = #f;
>   while ( n := read-line( stream, on-end-of-stream: #f ) )
>     sum := sum + string-to-integer( n );
>   end;
>   sum
> end;
> 
> // Example 2: with more type constaints and optional syntax
> 
> define method sum-stream ( stream :: <stream> ) => ( s :: <integer> )
>   let sum :: <integer> = 0;
>   let n :: false-or( <string> ) = #f;
>   while ( n := read-line( stream, on-end-of-stream: #f ) )
>     sum := sum + string-to-integer( n );
>   end;
>   sum
> end method sum-stream;
> 
> // Example 3: more functional
> 
> define method read-lines ( stream )
>   let collection = make( <stretchy-vector> );
>   let line = #f;
>   while ( line := read-line( stream, on-end-of-stream: #f ) )
>     add!( collection, line );
>   end;
>   collection
> end;
> 
> define method sum-stream ( stream )
>   reduce( \+, map( string-to-integer, read-lines( stream ) ) )
> end;
> 
> __Jason