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

已查看 39 次
跳至第一个未读帖子

Alexis King

未读,
2015年2月17日 02:19:022015/2/17
收件人 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

未读,
2015年2月17日 08:26:222015/2/17
收件人 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

未读,
2015年2月17日 10:35:372015/2/17
收件人 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

未读,
2015年2月17日 11:31:242015/2/17
收件人 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

未读,
2015年2月17日 11:51:192015/2/17
收件人 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

未读,
2015年2月17日 11:59:262015/2/17
收件人 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

未读,
2015年2月17日 12:06:502015/2/17
收件人 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

未读,
2015年2月17日 12:10:082015/2/17
收件人 Vincent St-Amour、Alexis King、d...@racket-lang.org

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

Robby Findler

未读,
2015年2月17日 12:34:472015/2/17
收件人 Sam Tobin-Hochstadt、Jens Axel Søgaard、Alexis King、d...@racket-lang.org
Yes, that's true.

Robby

Dan Burton

未读,
2015年2月17日 14:47:282015/2/17
收件人 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

未读,
2015年2月17日 15:03:202015/2/17
收件人 Dan Burton、Vincent St-Amour、Alexis King、d...@racket-lang.org

(I was thinking dissertations.)

Alexander D. Knauth

未读,
2015年2月17日 17:00:252015/2/17
收件人 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:

回复全部
回复作者
转发
0 个新帖子