From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Antipov Newsgroups: gmane.emacs.devel Subject: Re: (n)reverse vs. length Date: Thu, 15 May 2014 08:29:14 +0400 Message-ID: <5374429A.3090704@yandex.ru> References: <53737B79.7020704@yandex.ru> <87r43wrufz.fsf@fencepost.gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1400128190 12236 80.91.229.3 (15 May 2014 04:29:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 15 May 2014 04:29:50 +0000 (UTC) Cc: David Kastrup , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu May 15 06:29:44 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WknIc-0006bH-B0 for ged-emacs-devel@m.gmane.org; Thu, 15 May 2014 06:29:42 +0200 Original-Received: from localhost ([::1]:55596 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WknIb-0003tz-Uu for ged-emacs-devel@m.gmane.org; Thu, 15 May 2014 00:29:41 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59338) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WknIT-0003kW-Lr for emacs-devel@gnu.org; Thu, 15 May 2014 00:29:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WknIL-0002RL-T5 for emacs-devel@gnu.org; Thu, 15 May 2014 00:29:31 -0400 Original-Received: from forward7.mail.yandex.net ([77.88.61.37]:48195) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WknIF-0002Ou-8F; Thu, 15 May 2014 00:29:19 -0400 Original-Received: from smtp6.mail.yandex.net (smtp6.mail.yandex.net [77.88.61.56]) by forward7.mail.yandex.net (Yandex) with ESMTP id 81C331C0A26; Thu, 15 May 2014 08:29:16 +0400 (MSK) Original-Received: from smtp6.mail.yandex.net (localhost [127.0.0.1]) by smtp6.mail.yandex.net (Yandex) with ESMTP id 28183164005D; Thu, 15 May 2014 08:29:16 +0400 (MSK) Original-Received: from unknown (unknown [37.139.80.10]) by smtp6.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id Z1zz3crSAZ-TFaqB3BF; Thu, 15 May 2014 08:29:15 +0400 (using TLSv1 with cipher AES128-SHA (128/128 bits)) (Client certificate not present) X-Yandex-Uniq: b14a1c48-254c-4e55-874d-ddee003eb738 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1400128155; bh=yLqNEQMlpow7txxjMGQht00gwPHUyU/3EFDd91q3eNE=; h=Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject: References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=Ou5yjU/JKOu8Zqd3pL+kacnxFRW/XaMq1gKUjdSqDGcjdZrRZrh1crwiAtIrXtsNT qZ1okgGt/uZgaXrWxVj+i8CMb3JYsW0gv5rZ7XzKFep2uL9wQRfKhgZHn7qim8egQg miUCVoygvshzkg/Yf8AlXjfe/V7Ann0mviMcu1PI= Authentication-Results: smtp6.mail.yandex.net; dkim=pass header.i=@yandex.ru User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] [fuzzy] X-Received-From: 77.88.61.37 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:171846 Archived-At: On 05/15/2014 05:45 AM, Stefan Monnier wrote: >>> strings should be immutable >> Doesn't aset work on strings? > > Yes, I said "should be" not "are". Hm, what about an existing code which relies on aset'table strings? Questions like http://lists.gnu.org/archive/html/emacs-devel/2014-04/msg00378.html shows that treating string as an array of characters is a common practice (which is "natural" for the people with C background). And, in case of large strings, in-place reverse may save a lot of memory. Dmitry