From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.devel Subject: Re: Add seq-random-elt Date: Sat, 22 Oct 2016 08:42:46 -0400 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: <87bmyc8shl.fsf@lifelogs.com> References: <878ttime2i.fsf@cassou.me> <87bmyd8lwx.fsf@petton.fr> Reply-To: emacs-devel@gnu.org NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1477140264 9956 195.159.176.226 (22 Oct 2016 12:44:24 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 22 Oct 2016 12:44:24 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Oct 22 14:44:19 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bxvea-0007ts-Er for ged-emacs-devel@m.gmane.org; Sat, 22 Oct 2016 14:44:00 +0200 Original-Received: from localhost ([::1]:37171 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bxvec-0002Q5-Kq for ged-emacs-devel@m.gmane.org; Sat, 22 Oct 2016 08:44:02 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38706) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bxve4-0002Py-78 for emacs-devel@gnu.org; Sat, 22 Oct 2016 08:43:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bxve1-0003Di-5a for emacs-devel@gnu.org; Sat, 22 Oct 2016 08:43:28 -0400 Original-Received: from [195.159.176.226] (port=57334 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1bxve0-0003Cj-VR for emacs-devel@gnu.org; Sat, 22 Oct 2016 08:43:25 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1bxvdY-0000M8-3w for emacs-devel@gnu.org; Sat, 22 Oct 2016 14:42:56 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: emacs-devel@gnu.org Original-Lines: 18 Original-X-Complaints-To: usenet@blaine.gmane.org X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6; d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" Mail-Copies-To: never Cancel-Lock: sha1:mVoDfTXGYXCle2Iq0be1Kjjf+uY= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 195.159.176.226 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:208594 Archived-At: On Fri, 21 Oct 2016 17:30:02 -0400 Stefan Monnier wrote: >>> Hmm... do we really need that? What's the benefit? >> I think it's convenient. Accessing random elements of sequences is not >> uncommon. SM> (seq-elt L (random (seq-length L))) SM> it pretty convenient to write and pretty clear as well, so the benefit SM> seems slim. I don't like to name variables twice. I've sometimes forgotten to change the second place when I copy and paste, creating very annoying bugs. I also think this would be helpful to beginners who may not intuit the right approach so easily. Ted