|
|
|
|
|
by samdphillips
1772 days ago
|
|
You're critique is valid. `length` `vector-length` and `string-length` are from the very monomorphic old Scheme libraries. The Racket module system does provide ways to use the names you want without having to change the core language. The `collections` package (https://pkgs.racket-lang.org/package/collections) also smooths over some of these issues. |
|
I knew there were historical reasons behind some of these things (just like the old complaints about car and cdr not being called first and rest). Sometimes it feels like this hewing to history comes with some baggage that makes adoption a little more challenging.
I find myself writing the following in some of my projects, for example:
So that I can do something like: I feel a little silly each time because it seems like the sort of thing that should just "be there," in the way you can do something like hsh['a']['b'] in Python. Of course there are ways to make it a bit more like Clojure--I think Greg Hendershott created a Clojure-like layer called rackjure--so that you can access using the variable name, etc. It would be nice to have something standardized to make the ergonomics nicer.