Article View: comp.lang.functional
Article #897Re: Help needed with behaviour of SML
From: Raul Rockwell
Date: Sat, 04 May 1991 17:48
Date: Sat, 04 May 1991 17:48
31 lines
1820 bytes
1820 bytes
Shail Aditya Gupta writes:
> ML's interactive script can be viewed ... with each statement being
> defined in the lexical scope of all the previous ones. If you view
> it this way ... it is logical and reasonable that the second
> definition of "a" shadows the first, but the first had been "closed
> over" in the lexical closure environment of the function "b", which
> can never be destroyed, only further shadowed...
Chris Dollin writes:
> The ML definition is fine for batch use, but for incremental
> development it's a pigs trotter.
> [*Why* is ML like this? Because it's a functional language, ie, it
> has no assignment, so values don't change. Apart, of course, from
> arrays, and references. Pah.]
triple pah!
(1) dynamic shadowing is just another name for changing values
(2) you shouldn't be able to re-assign values in a constant array (can
you??)
(3) if you want to change a value referred to from a function, you
probably ought to use a reference of some sort :-)
Raul Rockwell
Disclaimer: I'm a J person, not an ML person. I speak with a mild
ignorance of the mechanics of ML.
Technical Details
Message-ID:
<ROCKWELL.91May4124854@socrates.umd.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!udel!haven.umd.edu!socrates.umd.edu!socrates!rockwellReferences:
<9104262016.AA28063@enuxha.eas.asu.edu> <TMB.91Apr26222738@volterra.ai.mit.edu> <20644@ogicse.ogi.edu> <KERS.91May2084808@cdollin.hpl.hp.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!udel!haven.umd.edu!socrates.umd.edu!socrates!rockwell From: rockwell@socrates.umd.edu (Raul Rockwell) Newsgroups: comp.lang.functional Subject: Re: Help needed with behaviour of SML Message-ID: <ROCKWELL.91May4124854@socrates.umd.edu> Date: 4 May 91 17:48:54 GMT References: <9104262016.AA28063@enuxha.eas.asu.edu> <TMB.91Apr26222738@volterra.ai.mit.edu> <20644@ogicse.ogi.edu> <KERS.91May2084808@cdollin.hpl.hp.com> Sender: rockwell@socrates.umd.edu (Raul Rockwell) Organization: Traveller Lines: 31 In-Reply-To: kers@hplb.hpl.hp.com's message of 2 May 91 07: 48:08 GMT