What is the policy on what is included in the core libraries?

39 views
Skip to first unread message

Alexis King

unread,
Feb 17, 2015, 2:19:02 AM2/17/15
to d...@racket-lang.org
I was just thinking today that I would, for example, find it useful to have a (zip ...) function in racket/list that would be equivalent to (map list ...). Users coming from a Haskell background might even find it useful to have a zip-with function that is simply an alias for map. Admittedly, these are rather trivial, but (especially in the first case) I think they’d still be useful.

I am all for avoiding feature creep and code bloat, but Racket’s “batteries included” approach seems to make functions like these prime candidates for libraries like racket/list. As long as they’re not in racket/base, they seem fairly harmless, especially considering they would only be needed at compile-time.

Should I even consider adding things like this, or is the consensus that the libraries are mostly sufficient as-is?

Robby Findler

unread,
Feb 17, 2015, 8:26:22 AM2/17/15
to Alexis King, d...@racket-lang.org
I don't think the libraries are sufficient as is, but I would resist
adding aliases.

Perhaps a better way to get people coming from Haskell would be to
write an essay specifically aimed there?

- Step 1: use variables.
- Step 2: here are `for` loops!

;)

Robby
> --
> You received this message because you are subscribed to the Google Groups
> "Racket Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to racket-dev+...@googlegroups.com.
> To post to this group, send email to racke...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/racket-dev/5D941DB1-8A55-4A41-98A2-A3BE1BFE6D40%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.

Matthias Felleisen

unread,
Feb 17, 2015, 10:35:37 AM2/17/15
to Alexis King, d...@racket-lang.org

I'd add them to Typed Racket. That's what Haskellians are most likely to explore and when they find them, it's a good thing (tm). -- Matthias

Jens Axel Søgaard

unread,
Feb 17, 2015, 11:31:24 AM2/17/15
to Robby Findler, Alexis King, d...@racket-lang.org
2015-02-17 14:26 GMT+01:00 Robby Findler <ro...@eecs.northwestern.edu>:
> I don't think the libraries are sufficient as is, but I would resist
> adding aliases.

A alternative: Added the word zip to the documentation index,
link it to map and have an example where in (map list ...) is used.

Also: Isn't zip in srfi/1 ?

/Jens Axel

Sam Tobin-Hochstadt

unread,
Feb 17, 2015, 11:51:19 AM2/17/15
to Jens Axel Søgaard, Robby Findler, Alexis King, d...@racket-lang.org
On Tue, Feb 17, 2015 at 11:31 AM, Jens Axel Søgaard
<jens...@soegaard.net> wrote:
> 2015-02-17 14:26 GMT+01:00 Robby Findler <ro...@eecs.northwestern.edu>:
>> I don't think the libraries are sufficient as is, but I would resist
>> adding aliases.
>
> A alternative: Added the word zip to the documentation index,
> link it to map and have an example where in (map list ...) is used.

Since `zip` isn't an alias for anything, I think we should add it.

Sam

Eli Barzilay

unread,
Feb 17, 2015, 11:59:26 AM2/17/15
to Robby Findler, Alexis King, d...@racket-lang.org
On Tue, Feb 17, 2015 at 8:26 AM, Robby Findler
<ro...@eecs.northwestern.edu> wrote:
> I don't think the libraries are sufficient as is, but I would resist
> adding aliases.
>
> Perhaps a better way to get people coming from Haskell would be to
> write an essay specifically aimed there?
>
> - Step 1: use variables.
> - Step 2: here are `for` loops!

Instead of an essay, this could be a guide for Haskellers/MLers/
Whatever-ers, which would make it easy to get results into documentation
searches, and that would make it easy to address issues that cannot be
resolved with a new binding like the bad argument order in `take` or the
different input function for the folds.

(Another point for avoiding a `zip` binding is that it's much more
likely to collide with user defined functions than it is in other
languages.)

--
((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:
http://barzilay.org/ Maze is Life!

Vincent St-Amour

unread,
Feb 17, 2015, 12:06:50 PM2/17/15
to Matthias Felleisen, Alexis King, d...@racket-lang.org
I don't think we should add functions to TR that are not in Racket and
that are not clearly type-related (e.g., `cast`).

I also like Jens's solution better. Education vs crutches.

Vincent



At Tue, 17 Feb 2015 10:39:16 -0500,
> To view this discussion on the web visit https://groups.google.com/d/msgid/racket-dev/EAAD5B93-DB78-419B-A662-131AD1D3E303%40ccs.neu.edu.

Matthias Felleisen

unread,
Feb 17, 2015, 12:10:08 PM2/17/15
to Vincent St-Amour, Alexis King, d...@racket-lang.org

At some point TR will move on, and perhaps the time has come.

Robby Findler

unread,
Feb 17, 2015, 12:34:47 PM2/17/15
to Sam Tobin-Hochstadt, Jens Axel Søgaard, Alexis King, d...@racket-lang.org
Yes, that's true.

Robby

Dan Burton

unread,
Feb 17, 2015, 2:47:28 PM2/17/15
to Matthias Felleisen, Vincent St-Amour, Alexis King, d...@racket-lang.org
Matthias, when you say "At some point TR will move on," what do you mean by that? I, for one, would like to see TR more tightly integrated with regular racket a la progressive types, rather than branching off into its own arena.
To view this discussion on the web visit https://groups.google.com/d/msgid/racket-dev/63C7696A-1532-400A-825D-247BB3E31750%40ccs.neu.edu.

For more options, visit https://groups.google.com/d/optout.


--
-- Dan Burton

Matthias Felleisen

unread,
Feb 17, 2015, 3:03:20 PM2/17/15
to Dan Burton, Vincent St-Amour, Alexis King, d...@racket-lang.org

(I was thinking dissertations.)

Alexander D. Knauth

unread,
Feb 17, 2015, 5:00:25 PM2/17/15
to dev@racket-lang.org Devs
Somewhat related, would it make sense to add a function like stx-e that would be like (if (syntax? stx) (syntax-e stx) stx) to syntax/stx?

On Feb 17, 2015, at 2:18 AM, Alexis King <lexi....@gmail.com> wrote:

Reply all
Reply to author
Forward
0 new messages