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-11 20:44

>>45
I disagree because there's a point where you can factor out functions but you can't really come up with meaningful names for them, so you end up with lots of tiny functions with weird ass names, but in concatenative languages you kinda have no choice but to do just that, because otherwise the stack juggling mental overhead that would ensue would drive you (and everyone who touches your code) insane. Some times it's easier to come up with meaningful variable names than names for artificially factored out functions.
Example?

Plus I was asking for an example of extreme factoring's superiority over sensible variable naming, specifically one that coul only work in concatenative languages. That example right there can be reproduced in any OO language or  any language that supports currying.
That was an example of a readable long function.

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