Google Grupper har inte längre stöd för nya Usenet-inlägg eller -prenumerationer. Historiskt innehåll förblir synligt.
Dismiss

Of languages and religions

12 visningar
Hoppa till det första olästa meddelandet

Biep @ http://www.biep.org/

oläst,
17 juli 2001 04:34:412001-07-17
till
"rez" <no...@hotmail.com> asked
> By the way, is functionnal programming really hard to learn?

Biep @ http://www.biep.org/ (repl...@my-web-site.com) replied:
> The main problem is that having learned imperative programming makes it
> very hard to learn FP. Students who have never programmed before usually
> find it quite easy, while the ones having had IP are struggling.

Then "Matthew M. Huntbach" <m...@dcs.qmw.ac.uk>
wonders in message news:9j0rk9$q3k$3...@beta.qmw.ac.uk...
> Do you have empirical evidence for this claim? I think it was always a
> hope rather than anything provably true. While a strong IP background
> does make it harder to get into FP, my experience is that students coming
> fresh to programming with no IP experience still find FP hard.

No published empirical evidence, just my own from teaching. Students who
came to university with some IP experience as a rule had a harder time
switching paradigms than "blank" ones had acquiring one. (And,
interestingly, in my experience girls do repatively better on FP and boys
on IP - which seems to go against all notions of girls being weaker at
maths. But then CS students are of course a self-selected sample.)

FP has several levels, the first being the notion of threading an
ever-changing value through a computation rather than putting it somewhere
and change it as needed. That is the main paradigm shift I was talking
about. Next comes the notion of functions as values, but it is no use
trying to make that step before the first has been interned. Abstraction
of control, and pointless programming is then a relatively easy step in
theory; the main difficulty there is how to apply it in practice.

Anybody has a different experience?

--
Biep
Reply via http://www.biep.org


Simon Helsen

oläst,
17 juli 2001 11:56:072001-07-17
till
On Tue, 17 Jul 2001, Biep @ http://www.biep.org/ wrote:

>No published empirical evidence, just my own from teaching. Students who
>came to university with some IP experience as a rule had a harder time
>switching paradigms than "blank" ones had acquiring one. (And,
>interestingly, in my experience girls do repatively better on FP and boys
>on IP - which seems to go against all notions of girls being weaker at
>maths. But then CS students are of course a self-selected sample.)

I agree on the blank minds. But I do not know whether this causal. My
impression is that students who did some programming before tend to have
a different mentality about programming and CS than the other ones. The
former usually beleive they know everything already and are reluctant to
beleive that there exist other ways of doing things (for instance FP)

As for girls, I cannot add empirical evidence since we hardly have any
girls at all here. But I can imagine that they are more open to FP for
exactly the same reasons I mention above. Funny, I didn't know it was
common to beleive girls are not good in maths. In fact, in all the
universities I have been (4 in all) there were more women studying math
than men!

regards,

Simon

Mark Carroll

oläst,
17 juli 2001 13:38:572001-07-17
till
In article <9j0t9n$lcn0p$1...@ID-63952.news.dfncis.de>,
Biep @ http://www.biep.org/ <repl...@my-web-site.com> wrote:
(snip)

>No published empirical evidence, just my own from teaching. Students who
>came to university with some IP experience as a rule had a harder time
>switching paradigms than "blank" ones had acquiring one. (And,
(snip)

I think that my IP experience did hinder my FP learning. I'd see a
problem, and my mind would immediately think of an IP solution, which
I'd then notice that I could code in a functional programming language
using a recursive function which basically transformed each state of
my IP to its next state and then applied itself to that new state
(passing the 'IP state' explicitly).

Because I was so eager to think of things this way, my guess is that
more FP-like solutions were somewhat obstructed from coming to mind.

-- Mark

David Basil Wildgoose

oläst,
17 juli 2001 14:06:492001-07-17
till

Speaking as someone with over 20 years experience in various
"non-functional" programming languages I would have to agree. I have
decided to learn some FP as part of my continuing desire to become a
better programmer. I have no problem with concepts like
pattern-matching and recursion, but you do need to make a mental
"switch" when thinking about what you are doing if you are used to an
imperative style.

I hope I don't offend anybody, but it does seem to me that because FP
appears very much an "academic" discipline, there appears to be an
assumption that anyone attempting to learn FP can just ask their tutor
if there is something that they don't understand.

Those of us who graduated from University almost 15 years ago don't
have that kind of luxury.

What FP needs is a GOOD, SIMPLE introduction to its concepts for those
of us from an imperative programming background. Basically, something
to help that "mental switch" be formed.

Until then, I suppose I'll just have to persevere...

Albert Y. C. Lai

oläst,
17 juli 2001 17:48:012001-07-17
till
Regarding knowing imperative programming before learning functional
programming. I had had at least five years of BASIC, Pascal, and C
programming before I first learned functional programming via Lisp
in a "principles of programming languages" course. I did not have
much difficulty switching to the functional mode. I think here
are some reasons:

1. I loved recursion, even when I knew only imperative programming.

2. We were actually taught procedural programming and modularity. I
constantly thought about the tradeoff between reading from global
variables and obtaining input parameters, and between writing to
global variables and returning results. First-order functional
programming was then merely one end of the spectrum.

3. Second-order functional programming was not that much a leap; qsort
and bsearch in the C library are second-order already, so map was
no rocket science. But once you can go from first-order to
second-order, you can see there is room for unlimited generalization,
and your mind opens up.

4. Having understood second-order functions, anonymous functions are
simply a much appreciated feature.

Perhaps teachers find this useful in designing their courses.

c...@ragwind.localdomain.net

oläst,
17 juli 2001 23:03:092001-07-17
till
wild...@operamail.com (David Basil Wildgoose) writes:

> > Biep @ http://www.biep.org/ (repl...@my-web-site.com) replied:
> > > The main problem is that having learned imperative programming makes it
> > > very hard to learn FP. Students who have never programmed before usually
> > > find it quite easy, while the ones having had IP are struggling.
> >
> > Then "Matthew M. Huntbach" <m...@dcs.qmw.ac.uk>
> > wonders in message news:9j0rk9$q3k$3...@beta.qmw.ac.uk...
> > > Do you have empirical evidence for this claim? I think it was always a
> > > hope rather than anything provably true. While a strong IP background
> > > does make it harder to get into FP, my experience is that students coming
> > > fresh to programming with no IP experience still find FP hard.
> >
> > No published empirical evidence, just my own from teaching. Students who
> > came to university with some IP experience as a rule had a harder time

...<snip>...


> >
> > Anybody has a different experience?
>
> Speaking as someone with over 20 years experience in various
> "non-functional" programming languages I would have to agree. I have
> decided to learn some FP as part of my continuing desire to become a
> better programmer. I have no problem with concepts like

...<snip>...


> What FP needs is a GOOD, SIMPLE introduction to its concepts for those
> of us from an imperative programming background. Basically, something
> to help that "mental switch" be formed.

I'll throw in my two cents. I became a professional programmer over
20 years ago, when in my thirties (dates me doesn't it). I had trouble
with the ordinary 'imperative' paradigm when I was first exposed to
programming back in the mid-sixties (the class was numerical analysis
and the teacher was more interested in teaching that than FORTRAN).
It wasn't until, years later and back in school on the GI bill that I
happened to take a class in digital logic that included an abstract
kind of assembly language that I finally caught on, then programming
became simple, until I hit functional languages, where the idea seems
to be to do everything possible to hide what's going on under the hood
from the student as it will poison their minds forever. I may be atypical,
but I'm much more comfortable when I have a glimmer of an idea what's
really happening.
--
Replace ragwind.localdomain with rahul for a working email address

cbbr...@hex.net

oläst,
17 juli 2001 23:34:302001-07-17
till
c...@ragwind.localdomain.net writes:
> I'll throw in my two cents. I became a professional programmer over
> 20 years ago, when in my thirties (dates me doesn't it). I had
> trouble with the ordinary 'imperative' paradigm when I was first
> exposed to programming back in the mid-sixties (the class was
> numerical analysis and the teacher was more interested in teaching
> that than FORTRAN). It wasn't until, years later and back in school
> on the GI bill that I happened to take a class in digital logic that
> included an abstract kind of assembly language that I finally caught
> on, then programming became simple, until I hit functional
> languages, where the idea seems to be to do everything possible to
> hide what's going on under the hood from the student as it will
> poison their minds forever. I may be atypical, but I'm much more
> comfortable when I have a glimmer of an idea what's really
> happening.

Two of the [arguably] best books out there on programming are:

a) SICP - Structure and Interpretation of Computer Programs
b) PAIP - Paradigms of Artificial Intelligence Programming

They are perhaps the best "theoretical" books, respectively, on Scheme
and Common Lisp.

Both start with rather abstract treatments of programming; SICP
doesn't get around to dealing with "assignment" until _well_ into the
book, and both start off by shovelling the details of "what's under
the hood" into the background.

But neither leaves off that way; both of them start with pretty
extreme abstraction, especially with SICP, but ultimately move into
the task of building compilers, which includes the notion of looking
under the hood into what "machine code" underlies the behaviour of the
programs.

You're certainly not alone in having an interest in the "concrete;"
both of these _exceptional_ references complete their descriptions of
their languages by presenting significant details on how a compiler
and a [well, abstract...] physical machine works.
--
(concatenate 'string "cbbrowne" "@ntlug.org")
http://vip.hex.net/~cbbrowne/lisp.html
"We defeated the enemy with teamwork and the hammer of not bickering."
-- The Shoveller, Mystery Men

Matt Kennel

oläst,
18 juli 2001 01:19:452001-07-18
till
:"rez" <no...@hotmail.com> asked

:> By the way, is functionnal programming really hard to learn?
:
:Biep @ http://www.biep.org/ (repl...@my-web-site.com) replied:
:> The main problem is that having learned imperative programming makes it
:> very hard to learn FP. Students who have never programmed before usually
:> find it quite easy, while the ones having had IP are struggling.
:
:Then "Matthew M. Huntbach" <m...@dcs.qmw.ac.uk>
:wonders in message news:9j0rk9$q3k$3...@beta.qmw.ac.uk...
:> Do you have empirical evidence for this claim? I think it was always a
:> hope rather than anything provably true. While a strong IP background
:> does make it harder to get into FP, my experience is that students coming
:> fresh to programming with no IP experience still find FP hard.
:
:No published empirical evidence, just my own from teaching. Students who
:came to university with some IP experience as a rule had a harder time
:switching paradigms than "blank" ones had acquiring one. (And,
:interestingly, in my experience girls do repatively better on FP and boys
:on IP - which seems to go against all notions of girls being weaker at
:maths. But then CS students are of course a self-selected sample.)

At least in the gender balance in fields, I see more women in
pure mathematics and computer science than I do in physical sciences
and physical (mechanical, aerospace and electrical) engineering.

Maybe the issue isn't `not being good at maths' but really `not being
good at understanding abstractions and representations and
manipulations of state' hence the distinction between math and physics.

:FP has several levels, the first being the notion of threading an


:ever-changing value through a computation rather than putting it somewhere
:and change it as needed. That is the main paradigm shift I was talking
:about. Next comes the notion of functions as values, but it is no use
:trying to make that step before the first has been interned. Abstraction
:of control, and pointless programming is then a relatively easy step in
:theory; the main difficulty there is how to apply it in practice.
:
:Anybody has a different experience?
:
:--
:Biep
:Reply via http://www.biep.org

:
:


--
* Matthew B. Kennel/Institute for Nonlinear Science, UCSD
*
* "To chill, or to pop a cap in my dome, whoomp! there it is."
* Hamlet, Fresh Prince of Denmark.

Biep @ http://www.biep.org/

oläst,
18 juli 2001 03:22:202001-07-18
till
"Simon Helsen" <hel...@informatik.uni-freiburg.de> wrote in message
news:Pine.LNX.4.33.010717...@nakalele.informatik.uni-freib
urg.de...
> Funny, I didn't know it was common to believe

> girls are not good in maths.
> In fact, in all the universities I have been (4 in all)
> there were more women studying math than men!

This is very different from the Dutch situation, then. There has even been
government propaganda to make girls choose an exact study, with almost zero
result (some more women in the first year of university, no visible
difference in subsequent years).

Biep @ http://www.biep.org/

oläst,
18 juli 2001 03:24:112001-07-18
till
"Mark Carroll" <ma...@chiark.greenend.org.uk> wrote in message
news:zOq*m4...@news.chiark.greenend.org.uk...

> I think that my IP experience did hinder my FP learning. I'd see a
> problem, and my mind would immediately think of an IP solution, which
> I'd then notice that I could code in a functional programming language
> using a recursive function which basically transformed each state of
> my IP to its next state and then applied itself to that new state
> (passing the 'IP state' explicitly).

So you were on the brink of inventing monads, were you? Pretty impressive!
:-)

Marco van de Voort

oläst,
18 juli 2001 06:41:572001-07-18
till

I also think that measured difference is more that girls are much harder
workers.

And the proposed difference is more a result of a tradition that hasn't been
entirely eradicated. (boys more encouraged to do technical and abstract
hobby/studies, while girls seem to be pushed into the soft sector)

Markus Mottl

oläst,
18 juli 2001 07:50:222001-07-18
till
In comp.lang.functional Marco van de Voort <mar...@toad.stack.nl> wrote:
> I also think that measured difference is more that girls are much harder
> workers.

> And the proposed difference is more a result of a tradition that hasn't been
> entirely eradicated. (boys more encouraged to do technical and abstract
> hobby/studies, while girls seem to be pushed into the soft sector)

Actually, there is a funny (true!) story about a university that conducted
a survey to find out whether boys and girls are treated differently in
examinations.

And indeed, they found out that girls got worse marks in average
considering the whole university.

So they wanted to know, which of the departments belonged to the sexist
black sheep that unfairly suppressed the innocent girls. Stunning result:
girls were doing better on average at each department!

How can this be, did some statistician mess up results?

Finally, the simple cause of all this was:

Girls had over-proportionally chosen the most difficult
departments. Though they got better marks there than the boys (as at all
departments), the strict marking pushed their average down considerably,
whereas the lower number of "bad" boys there didn't have so much overall
impact.

Conclusion: considering the better performance of girls at each
department, girls were either more intelligent, more diligent or, ahem,
more beautiful... ;)

The last sexist interpretation is just an incentive for girls to respond
on this topic: I always wanted to know how many are reading c.l.f... ;)

Regards,
Markus Mottl

--
Markus Mottl, mo...@miss.wu-wien.ac.at, http://miss.wu-wien.ac.at/~mottl

Matthew M. Huntbach

oläst,
18 juli 2001 07:57:202001-07-18
till
Biep @ http://www.biep.org/ (repl...@my-web-site.com) wrote:
> Then "Matthew M. Huntbach" <m...@dcs.qmw.ac.uk>
> wonders in message news:9j0rk9$q3k$3...@beta.qmw.ac.uk...

> > Do you have empirical evidence for this claim? I think it was always a
> > hope rather than anything provably true. While a strong IP background
> > does make it harder to get into FP, my experience is that students coming
> > fresh to programming with no IP experience still find FP hard.

> No published empirical evidence, just my own from teaching. Students who
> came to university with some IP experience as a rule had a harder time
> switching paradigms than "blank" ones had acquiring one.

This is not the question I asked. I accept that experience with IP can
make it *more* difficult to get to grips with FP. But the question is
whether that is the only thing that makes FP difficult?

I used to believe all that propaganda about the only thing that made FP
difficult was people's minds being damaged by doing IP, and if only we
got to the kids first and fed them FP they'd find it easy. But my
experience of teaching leads me to doubt this. The FP paradigm does
require the ability to abstract right from the start, and this seems
to be fundamental to what makes it "difficult". There are many people
who seem to find it very hard to grasp the idea of abstraction, it
is a huge stumbling block. For this reason, I have come to believe
that the IP model is easier for novices to pick up and work with
from the start, due to it requiring less abstraction. That it is
easier for novices doesn't, of course, mean that it is best for them to
start that way.

Matthew Huntbach

Markus Mottl

oläst,
18 juli 2001 08:51:292001-07-18
till
In comp.lang.functional Matthew M. Huntbach <m...@dcs.qmw.ac.uk> wrote:
> The FP paradigm does require the ability to abstract right from the
> start, and this seems to be fundamental to what makes it "difficult".

That's right, but we have to see the reason: in most IPLs taught
at university (probably still C and C++, maybe Java is getting more
important now), there is a fairly large number of concepts that have to
be learnt so students and even teachers may get the wrong perception
of achievement when they have mastered pointers, templates, virtual
functions, overloading, etc.

In FPLs you don't have to know so much to somewhat master the language
as such. This means that students get to "Now you have to master the
art of solving real problems at an abstract level" much faster.

In my experience from tutoring students (mostly C++ at the time) they
often strongly believed that "When I have mastered language concept X,
too, then I'll be a better programmer.". At the same time demanding
from them implementations of even simple datastructures and algorithms
in the same language was usually out of the question.

Most FPL-courses get to fundemantal programming problems much faster and
therefore give students less positive or even "negative" feedback. As
most of us probably agree here, learning a new programming language is
easy compared to the goal of becoming a better programmer.

> There are many people who seem to find it very hard to grasp the idea
> of abstraction, it is a huge stumbling block. For this reason, I have
> come to believe that the IP model is easier for novices to pick up
> and work with from the start, due to it requiring less abstraction.

It is not languages that require abstraction but problems! Languages
_provide_ means of abstraction. It's the problems where most students
fail, not the language per se, though I have seen plenty of students
fail on concepts like pointers or templates. Teaching the concept of
"higher-order functions" is much easier in my eyes.

Biep @ http://www.biep.org/

oläst,
18 juli 2001 10:06:472001-07-18
till
"Markus Mottl" <mo...@miss.wu-wien.ac.at> wrote in message
news:9j3t5u$nol$2...@bird.wu-wien.ac.at...

> Conclusion: considering the better performance of girls
> at each department, girls were either more intelligent,
> more diligent or, ahem, more beautiful... ;)

> The last sexist interpretation is just an incentive for girls to respond
> on this topic: I always wanted to know how many are reading c.l.f... ;)

Sexist in that most teachers must be male (or lesbian)? :-)
But then it doesn't depend on relative beauty but on teacher preference (it
only would when teachers on the average have no a priori preference between
sexes). And in that case there are much worse remarks to make, if you want
to be sure that no girl ignores it.
But I prefer the beauty notion. FP being more beautiful than IP, it should
resonate more in the female mind (real beauty being inner beauty, that is
the place where the two meet..)

I think the situation you described happened on one of the Californian
universities. I must still have the paper somewhere.

Markus Mottl

oläst,
18 juli 2001 10:57:582001-07-18
till
In comp.lang.functional Biep @ http://www.biep.org/ <repl...@my-web-site.com> wrote:
> I think the situation you described happened on one of the Californian
> universities. I must still have the paper somewhere.

If I remember correctly, I found it in a book about paradoxons by
Martin Gardner, the former author of mathematical puzzles in Scientific
American. It's really a nice example of how intuition fools people when
confronted with this kind of statistical paradoxon. Most people would
probably have expected that there must be at least one department that
treats girls unfairly.

Sian Leitch

oläst,
20 juli 2001 05:20:362001-07-20
till
In article <265d96ac.01071...@posting.google.com>,

wild...@operamail.com (David Basil Wildgoose) wrote:
> What FP needs is a GOOD, SIMPLE introduction to its concepts for those
> of us from an imperative programming background. Basically, something
> to help that "mental switch" be formed.

It is actually possible to write FP-wise in Algol 68. Would anybody
care to write David' GOOD, SIMPLE introduction to FP's concepts using
Algol 68?

Regards
--
Dr. Ing. Sian Leitch
Software Engineer specialising in Algol 68
Algol 68 for Linux is available from <http://www.sleitch.nildram.co.uk/>

Sian Leitch

oläst,
20 juli 2001 05:24:132001-07-20
till
In article <m3vgkr5...@trebla.cs.toronto.edu>,

Is this an example of an anonymous function? Here is a routine
declaration:-
PROC p1 = (PROC(INT)INT a1, INT a2)INT: a1(a2);
and here is a call:-
p1((INT n)INT: ABS sin(n*pi),ABS(2*pi))

FM

oläst,
20 juli 2001 22:48:122001-07-20
till
"Markus Mottl" <mo...@miss.wu-wien.ac.at> wrote:

> Actually, there is a funny (true!) story about a university that conducted
> a survey to find out whether boys and girls are treated differently in
> examinations.
>
> And indeed, they found out that girls got worse marks in average
> considering the whole university.
>
> So they wanted to know, which of the departments belonged to the sexist
> black sheep that unfairly suppressed the innocent girls. Stunning result:
> girls were doing better on average at each department!
>
> How can this be, did some statistician mess up results?
>
> Finally, the simple cause of all this was:
>
> Girls had over-proportionally chosen the most difficult
> departments.

Or there was a sexist conspiracy to make the male-dominated
departments grade more leniently.


> Though they got better marks there than the boys (as at all
> departments), the strict marking pushed their average down considerably,
> whereas the lower number of "bad" boys there didn't have so much overall
> impact.

I think it's called Simpson's Paradox, in its general form.
The example I heard involved the admission process - I'm
not sure they share the same source, though both sound quite
spurious.


Dan.

Albert Y. C. Lai

oläst,
21 juli 2001 02:32:062001-07-21
till
si...@sleitch.nildram.co.uk (Sian Leitch) writes:

> Is this an example of an anonymous function? Here is a routine
> declaration:-
> PROC p1 = (PROC(INT)INT a1, INT a2)INT: a1(a2);

This defines p1 as a second-order function.

> and here is a call:-
> p1((INT n)INT: ABS sin(n*pi),ABS(2*pi))

The first actual parameter is an anonymous function. Yes.

This language is not bad.

Jimmy Kerl

oläst,
23 juli 2001 02:09:492001-07-23
till
Biep @ http://www.biep.org/ wrote:
>
> No published empirical evidence, just my own from teaching. Students who
> came to university with some IP experience as a rule had a harder time
> switching paradigms than "blank" ones had acquiring one. (And,
> interestingly, in my experience girls do repatively better on FP and boys
> on IP - which seems to go against all notions of girls being weaker at
> maths. But then CS students are of course a self-selected sample.)
>

Very interesting indeed! ive heard that girls brains are better at
handling multiple concepts at once and boys at focusing in on a single
line of thinking and boys better at abstractions.

Ive heard this is cause the conections between the 2 halfs of the brain is
smaller in boys a result of some chemical during pregnacy... (i cant recall
the source of these things so im not certian of their accuracy)

Now i wish i understood FP. :)

Biep @ http://www.biep.org/

oläst,
23 juli 2001 05:21:562001-07-23
till
"FM" <da...@dartmouth.edu> wrote in message
news:9jaqh7$k5q$1...@merrimack.Dartmouth.EDU...

> I think it's called Simpson's Paradox, in its general form.
> The example I heard involved the admission process
> - I'm not sure they share the same source,
> though both sound quite spurious.

No, it's not spurious, it really happened at the University of California
at Berkeley in 1973. The reference is:
Sex bias in graduate admissions: Data from Berkeley
P. J. Bickel, E. A. Hammel, J. W. O'Connell
Science, V 187, Feb 7, 1975, pp 398-404

Markus Mottl

oläst,
23 juli 2001 06:46:122001-07-23
till
In comp.lang.functional Biep @ http://www.biep.org/ <repl...@my-web-site.com> wrote:
> No, it's not spurious, it really happened at the University of California
> at Berkeley in 1973. The reference is:
> Sex bias in graduate admissions: Data from Berkeley
> P. J. Bickel, E. A. Hammel, J. W. O'Connell
> Science, V 187, Feb 7, 1975, pp 398-404

When I mentioned this phenomenon, I obviously mistakenly thought the
survey was about marks rather than about the admission process - it's
already long since I read about it.

Taking a look in the web, this "Simpson's paradox" is obviously quite
famous as an example of how interpretation of aggregate data can lead
to wrong conclusions.

James Jones

oläst,
23 juli 2001 09:47:292001-07-23
till
Sian Leitch wrote:
> It is actually possible to write FP-wise in Algol 68. Would anybody
> care to write David' GOOD, SIMPLE introduction to FP's concepts using
> Algol 68?

Hmm. One can do a lot applicatively in Algol 68; a routine text is
a lambda expression with different syntactic sugar--but I thought that
the strict stack nature of Algol 68 made it difficult to do some things
that functional programmers expect. Lindsay's partial parametrization
proposal was intended to improve Algol 68 in this respect, if memory
serves.

(If I'm wrong about this, I'd love to hear about it.)

James Jones

Opinions herein are those of the author, and not necessarily those of
any organization.

George Russell

oläst,
23 juli 2001 10:30:352001-07-23
till
James Jones wrote:
>
> Sian Leitch wrote:
> > It is actually possible to write FP-wise in Algol 68. Would anybody
> > care to write David' GOOD, SIMPLE introduction to FP's concepts using
> > Algol 68?
>
> Hmm. One can do a lot applicatively in Algol 68; a routine text is
> a lambda expression with different syntactic sugar--but I thought that
> the strict stack nature of Algol 68 made it difficult to do some things
> that functional programmers expect.
[snip]
Yes, this is correct. You can write anonymous functions in Algol68, but
they are nonetheless fixed. If an anonymous function has a free variable,
this variable will be the same wherever the function is used. If the
variable is out of scope, you may have problems . . .

Greg Michaelson

oläst,
25 juli 2001 06:56:532001-07-25
till
James Jones (jej...@microware.com) wrote:

: Sian Leitch wrote:
: > It is actually possible to write FP-wise in Algol 68. Would anybody
: > care to write David' GOOD, SIMPLE introduction to FP's concepts using
: > Algol 68?

Have a look at:
Lloyd Allison, A practical introduction to denotational semantics, CUP, 1986
In chapter 7 he discusses the translation of standard semantics into Algol 68.
The SS notation is very like a FPL. He also refers to:
F.G.Pagan , Algol-68 as a metalanguage for denotational semantics, Computer
Journal, Vol 22, No 1, Feb 1979
and comments that "Pagan suggests the use of Algol-68 extended with
partial parameterisation."

Greg Michaelson

0 nya meddelanden