Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Linked lists considered harmful

Name: Anonymous 2009-10-10 20:46

  ↑    slava_pestov 4 points 5 hours ago [-]
  ↓    A perfect illustration of why single linked lists are simply the wrong data structure in
        99% of cases. Just use arrays and you won't have to choose between tail recursion, and
        front-to-back iteration order.
        permalink report reply

Name: Anonymous 2009-10-10 22:27

>>19
I don't know Haskell well, but Factor code is, IMO, clearer. There's less syntax involved, which is always a plus to me. No need for “.”, since every function call can be composition. No need for parens, since RPN is unambiguous.

Here's a mostly pointless point free example in both, which illustrates the general difference.
map ((+10) . (*2)) [0..5]
6 [ 2 * 10 + ] map

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List