Re: Hashing and comparing of arrays

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance





Ole Nielsby wrote:
Anyway, this is a C# NG and I'm getting off-topic...

taking it a little further OT ;)

BTW, when porting F# to C#, did you rewrite into "procedural"
style, or did you do it the functional way? Do you find C# useable
for functional programming?

(Years ago, I involved myself in a rather heated discussion
about tail call flattening in this NG. The C# compiler's lack
of support for this killed my first attempt of porting my
language to .NET. When I uttered my dissatisfaction whith
this, I was flooded with arguments against supporting it, and
when I tore some of these arguments apart, things got hot.
Anyway, I think a better functional programming support
in C# might help bridge the gap between procedural and
functional programming.)

MS C++ 7.0 has *excellent* tail call optimizations. During a course on
partial evaluation a while back I did three implementations of an
interpreter for a simple virtual machine:

- procedural, while ( true ) process next instruction
- tail-recursive via an accumulator
- CPS-style

The compiled code for the three ran at *almost* the same speed! I was
especially impressed with the CPS-rewrites done by the optimizer.

My hand-in is at http://slog.dk/svn/home/jensen/PEIOOL/ex4/ex4.pdf, and
you can browse around http://slog.dk/svn/home/jensen/PEIOOL/ex4/ if you
like.

--
Helge Jensen
mailto:helge.jensen@xxxxxxx
sip:helge.jensen@xxxxxxx
-=> Sebastian cover-music: http://ungdomshus.nu <=-
.



Relevant Pages

  • Re: Road to Clojure Survey 2.0
    ... AT> recur allows you anon functions to call themself. ... ??>> very little about functional programming, as you do not know even ... AT> What I was doing was talking about anon functions calling themselves. ... AT> Let's say you have a Lisp with no support for TCO. ...
    (comp.lang.lisp)
  • Re: Good functional programming habbit?
    ... Usually people who mention functional programming want to juxtapose it to ... functional programming language it's ok? ... least some support for immutable data structures to qualify as functional. ...
    (comp.lang.lisp)
  • Re: Flow based programming & python coding style
    ... >> and functional programming, although Paul Morrison is quick to point ... > Continuations provide a better conceptual fit. ... such as poor toolchain support). ... a not-so-far in the future "Stackless-like" Python. ...
    (comp.lang.python)
  • Re: Table based programming.
    ... procedural decomposition, or functional programming. ... support, and the like. ... Look up "Date and Codd". ... Comparison of the Application Programming Interfaces. ...
    (comp.lang.c)