multiple values 
Author Message
 multiple values

Hey, no fair, Greg. The ML hackers got type systems; the Scheme hackers don't.

ML's one-arg/one-ret-value scheme is indeed elegant and useful. I like
it better than Scheme's system. But you can't, as you suggested, just
go add types to Scheme. Then it wouldn't be Scheme. It would be ML
with a better syntax, or Infer. This is good. Probably better than Scheme.
But not Scheme.

I think you could add a lot of missing, important things to Scheme and keep
it Scheme: modules, records, exceptions. But not Hindley-Milner, required
types.

But who cares? James Clerk Maxwell was once lecturing on theories of light.
There are two general models for light, he said: particle and wave. People
used to think of light as a stream of tiny particles. But they are all dead.

If you see where I'm headed...
        -Olin



Mon, 11 Jan 1999 03:00:00 GMT  
 multiple values

Quote:

> OK, I'll bite.  Why would you want something to remain Scheme if
> something better were available?  Isn't there enough experience to say
> that static typing, like static scoping, is the Right Thing?

Nope.  Dynamic typing gives programs better modularity ease of authoring,
cuts down on multiple inclusions of a copy of a particular routine for each
type it applies to (which still happens in c++, even with templates), and
has numerous other benefits.  Static typing has ease of compilation and a
very tiny edge in speed.  So whether it's The Right Thing just depends
on what you're trying to do.  In general, in environments where functions
are passed as data, dynamic typing is agreed to be superior.  The smarter
compilers get (and the more complex programs get) the more I expect to see
dynamic typing in production languages.  

                                        Bear



Mon, 11 Jan 1999 03:00:00 GMT  
 multiple values




   > But you can't, as you suggested, just
   >go add types to Scheme. Then it wouldn't be Scheme. It would be ML
   >with a better syntax, or Infer. This is good. Probably better than Scheme.
   >But not Scheme.

   ...

   Why didn't you do scsh in ML, instead of Scheme?

Because the name ``mlsh'' is really ugly, probably.

Cliff

--
Clifford Beshers                     Computer Graphics and User Interfaces Lab

http://www.cs.columbia.edu/~beshers                        Columbia University



Mon, 11 Jan 1999 03:00:00 GMT  
 multiple values


Quote:

> But you can't, as you suggested, just
>go add types to Scheme. Then it wouldn't be Scheme. It would be ML
>with a better syntax, or Infer. This is good. Probably better than Scheme.
>But not Scheme.

OK, I'll bite.  Why would you want something to remain Scheme if
something better were available?  Isn't there enough experience to say
that static typing, like static scoping, is the Right Thing?

I'm not trying to start a flamewar (honest).  I'd just like to hear
the technical and software engineering arguments in favor of Scheme as
a development language, vs. ML or an ML-like successor to Scheme.  I'm
a Scheme user with an interest in AI.  For some time, I've been
wondering whether I should switch to ML, for things that don't require
Common Lisp.

Why didn't you do scsh in ML, instead of Scheme?

Quote:
>I think you could add a lot of missing, important things to Scheme and
> keep it Scheme: modules, records, exceptions.

However, portable Scheme language extensions for these features seem
even more remote than the global optimizations for containers you
mentioned earlier.  Even the feature that started this thread,
multiple return values, isn't "really" portable Scheme yet, because
the R5RS report never appeared.

Scheme language development seems to have stalled.  Why is Scheme
worth developing in, despite the absence of the features you list?  Or
do you expect that Scheme will eventually include such features?

Quote:
> But who cares? James Clerk Maxwell was once lecturing on theories of light.
> There are two general models for light, he said: particle and wave. People
> used to think of light as a stream of tiny particles. But they are all dead.
> If you see where I'm headed...

Sorry, I don't.  Are you suggesting Scheme v. ML == particle v.  wave
theory?  My impression is that both models are still used intuitively
under specific circumstances, even by physicists who know better.
Under what circumstances, in your view, should one prefer Scheme over
ML or an ML-like successor?

Rob Helm



Mon, 11 Jan 1999 03:00:00 GMT  
 multiple values


Quote:

> > OK, I'll bite.  Why would you want something to remain Scheme if
> > something better were available?  Isn't there enough experience to say
> > that static typing, like static scoping, is the Right Thing?

> Nope.  Dynamic typing gives programs better modularity ease of authoring,

This MIGHT be true if you compare dynamic typing to a statically typed
language with a really BAD type system.  SML's type system is good and it
promotes modularity and manages complexity better than Scheme.

Quote:
> cuts down on multiple inclusions of a copy of a particular routine for each
> type it applies to (which still happens in c++, even with templates),

SML does not produce a different implementation of a polymorphic routine
on a per-type basis.

Quote:
> Static typing has ease of compilation and a
> very tiny edge in speed.  

With the note that the performance of a good Scheme implementation is
much  better than most 'main-stream' programmers would guess, the
difference between a statically-typed language and a latently-typed
language is not "tiny".  Even with straight Scheme a lot of energy has
gone into improving performance via type inferrence.

But SML is faster.  For a raw iterative loop, C/C++ will always beat SML
(and Scheme).  However, it has been my experience that if any dynamic
memory management is involved, SML will significantly OUTPERFORM C/C++.

Quote:
> In general, in environments where functions
> are passed as data, dynamic typing is agreed to be superior.

You can't statically type "eval", but other than that, I don't believe
this statement at all.

Quote:
>  The smarter
> compilers get (and the more complex programs get) the more I expect to see
> dynamic typing in production languages.  

You're probably right, but the real reason dynamically-typed languages
have an advantage over statically-typed languages is because there is no
one right type system.  Safety and speed are very good things, but the
most important thing about a type system is the semantic framework it
provides for managing complexity.  The biggest advantage Scheme has over
SML is that it is possible to build new type systems, or type systems more
appropriate for a given problem.

Quote:
> So whether it's The Right Thing just depends
> on what you're trying to do.

Yup, yup.

Also, Scheme is more fun to program in because Scheme tends to let you
'feel' your way to a working program, whereas SML forces you to think your
way there.  But we have to remember that they're both so far beyond C++
that it's silly to argue about them.

Quote:
>                                         Bear

-thant


Tue, 12 Jan 1999 03:00:00 GMT  
 multiple values

   Path: hplntx!news.dtc.hp.com!col.hp.com!sdd.hp.com!swrinde!howland.reston.ans.net!newsfeed.internetmci.com!bloom-beacon.mit.edu!senator-bedfellow.mit.edu!usenet

   Newsgroups: comp.lang.scheme
   Date: 25 Jul 1996 09:15:17 -0400
   Organization: Artificial Intelligence Lab, MIT
   Lines: 18


   NNTP-Posting-Host: lambda.ai.mit.edu
   X-Newsreader: Gnus v5.1

   Hey, no fair, Greg. The ML hackers got type systems; the Scheme hackers don't.

   ML's one-arg/one-ret-value scheme is indeed elegant and useful. I like
   it better than Scheme's system. But you can't, as you suggested, just
   go add types to Scheme. Then it wouldn't be Scheme. It would be ML
   with a better syntax, or Infer. This is good. Probably better than Scheme.
   But not Scheme.

   I think you could add a lot of missing, important things to Scheme and keep
   it Scheme: modules, records, exceptions. But not Hindley-Milner, required
   types.

   But who cares? James Clerk Maxwell was once lecturing on theories of light.
   There are two general models for light, he said: particle and wave. People
   used to think of light as a stream of tiny particles. But they are all dead.

   If you see where I'm headed...
           -Olin



Tue, 12 Jan 1999 03:00:00 GMT  
 multiple values


|   Date: 25 Jul 1996 09:15:17 -0400
|
|   Hey, no fair, Greg. The ML hackers got type systems; the Scheme hackers don't.
|
|   ML's one-arg/one-ret-value scheme is indeed elegant and useful. I like
|   it better than Scheme's system. But you can't, as you suggested, just
|   go add types to Scheme. Then it wouldn't be Scheme. It would be ML
|   with a better syntax, or Infer. This is good. Probably better than Scheme.
|   But not Scheme.

You don't need types to do this in Scheme or Lisp.  You just need
multiple entry points for a higher-performance implementation.  In
another post I mention a rough outline of how to do this.

The only thing you have to give up is EQ?-ness of the
multiple-value/argument aggregates.  Of course, since ML doesn't
provide it either, you are no worse off.

In many cases, a fair amount of the efficiency to be gained from static
type systems can be regained by compiling procedures in two modes:
- assumptions satisfied
- general (default) mode

For first-order code, the assumptions can be checked by the linker,
which can generate interface stubs on demand to avoid exponentiation
of code, and there is no overhead for the calls when the assumptions
match.

Higher-order calls do incur some overhead, but the overhead is not
significantly greater than what is already in place (arity checking).
The alternate code can be generated on demand and cached for reuse.

|   I think you could add a lot of missing, important things to Scheme and keep
|   it Scheme: modules, records, exceptions. But not Hindley-Milner, required
|   types.
|
|   But who cares? James Clerk Maxwell was once lecturing on theories of light.
|   There are two general models for light, he said: particle and wave. People
|   used to think of light as a stream of tiny particles. But they are
|   all dead.

I think this applies equally well to both languages.  There may just
be a slight phase difference.

After all, things like VB, C, C++, and Java are where the action
really is, unfortunately.



Tue, 12 Jan 1999 03:00:00 GMT  
 multiple values


Quote:
(Patrick Stickler) writes:

p> Be on the lookout for a growing flurry of Scheme activity in the
p> SGML (Standard Generalized Markup Language - ISO 8879) community in
p> connection with DSSSL (Document Style Semantics and Specification
p> Language - ISO 10179), a standard composition specification
p> formalism which is based on R4RS Scheme (with a few tweaks).

This "growing flurry of activity" has already been happening for over
a year.  Unfortunately (or something), DSSSL isn't going to take the
world over and, as a result, it's not going to be a great big deal for
Scheme programmers looking for work.  In addition, the annoyance of
dealing with SGML can reasonably be expected to put off a lot of
otherwise-enthusiastic Schemers.

Apart from gratuitous overuse of special forms and special read syntax
and a small number of other nits that annoy the Scheme purist within
me, I think DSSSL is pretty decent as ISO standards go.

        <b

--
Let us pray:





Tue, 12 Jan 1999 03:00:00 GMT  
 multiple values


...

Quote:
>I think the Scheme community may yet recover momentum. The folks down at
>Rice are doing really interesting work with Scheme, Danvy has a draft R5RS,
>and Indiana, as always, holds the torch high.
>    -Olin

Don't forget the folks at Texas..


Tue, 12 Jan 1999 03:00:00 GMT  
 multiple values


Quote:

>It has occurred to me on multiple occasions that we would be better served
>by acronyms and names for things that had a certain "truth in advertising"

  [...]

As I recall, Alan Kay said that the reason Smalltalk was so named
was precisely to keep people's expectations low.

What could you expect from a little language for kids named Smalltalk?

(If it's not true, I don't want to know.)

--

| Papers on memory allocators, garbage collection, memory hierarchies,
| persistence and  Scheme interpreters and compilers available via ftp from
| ftp.cs.utexas.edu, in pub/garbage (or http://www.cs.utexas.edu/users/wilson/)      



Tue, 12 Jan 1999 03:00:00 GMT  
 
 [ 38 post ]  Go to page: [1] [2] [3]

 Relevant Pages 

1. (values (multiple-value-form)) whats the point?

2. Multiple-value-list with no values.

3. return multiple values from an awk function?

4. multiple values in a return from function

5. Multiple values [was:] Re: scanf() type function

6. Multiple Values

7. Setter Variables and Re: Multiple Values

8. Multiple Values (Correction)

9. multiple values

10. Multiple values in R5RS Scheme

11. interfaces (was Re: multiple values)

 

 
Powered by phpBB® Forum Software