Thanks to Nicolas Petton, Emacs is getting a new built-in sequence library in
25.1, and it’s already available on GNU Elpa for everyone. There’s not much to
be said about this besides the obvious “it’s about time”.
The popularity of dash.el speaks volumes about the need for this feature.
Combined with the recent inclusion of if-let, when-let, and the threading
macros into Emacs core, this should eventually allow most packages to phase out
that extra dependency. Not that there’s anything wrong with dash, of course,
but it’s nice to retire an external dependency if a built-in one becomes
available.
Still, in the field of sequence-processing, there are some noteworthy
differences that may lead you to prefer one over the other.
seq provides a unified interface for lists, vectors, and strings (i.e.,
sequences).
Some functions take arguments in a different order, such as (-take n list)
versus (seq-take list n).
Are there any operations you feel ought to be added to this arsenal? What about
other utility libraries that really should be built-in?
Update <2015-04-28 Tue>
This post used to say that “dash still covers a range of operations that seq
doesn’t”. However, Nico seems very intent on proving me wrong, and we now have
seq-difference and seq-intersection.
New on Elpa and in Emacs 25.1: seq.el
23 Mar 2015, by Artur Malabarba.New in 25.1 post series
Thanks to Nicolas Petton, Emacs is getting a new built-in sequence library in 25.1, and it’s already available on GNU Elpa for everyone. There’s not much to be said about this besides the obvious “it’s about time”.
The popularity of dash.el speaks volumes about the need for this feature. Combined with the recent inclusion of
if-let
,when-let
, and the threading macros into Emacs core, this should eventually allow most packages to phase out that extra dependency. Not that there’s anything wrong withdash
, of course, but it’s nice to retire an external dependency if a built-in one becomes available.Still, in the field of sequence-processing, there are some noteworthy differences that may lead you to prefer one over the other.
seq
provides a unified interface for lists, vectors, and strings (i.e., sequences).(-take n list)
versus(seq-take list n)
.Are there any operations you feel ought to be added to this arsenal? What about other utility libraries that really should be built-in?
Update <2015-04-28 Tue>
This post used to say that “
dash
still covers a range of operations thatseq
doesn’t”. However, Nico seems very intent on proving me wrong, and we now haveseq-difference
andseq-intersection
.Tags: emacs-25, elpa, package, emacs,
Cider-debug, a visual, interactive, debugger for Clojure »
« Easily Create Github PRs from Magit
Related Posts
It’s Magit! And you’re the magician! in package
Emacs 25 is out! What are the new features and what were my predictions in emacs-25
validate.el: Schema validation for Emacs-Lisp in elpa
Content © 2019, All rights reserved. Icons under CC3.0.