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

Racket

Name: Anonymous 2011-01-28 7:43

Why Racket doesn't have a uniform collection interface? It's fucking stupid to have string-ref, vector-ref, list-ref etc in the language.

Name: Anonymous 2011-01-28 8:50

>>7
You may want your code to be data-structure specific, and because of stream-ref returning two values when applied to an hash (they could just return a cons with (key . value)).
The non-polymorphic ``ref'' (that simply doesn't exist), length, map, etc are inherited from old Lisps, and freshmen in CL often wonder why they are not defined as generics.

However, you could just define your module/#lang that exports them as the stream-* variants and use it.

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