From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: Why (substring "abc" 0 4) does not return "abc" instead of an error? Date: Mon, 16 Jul 2012 07:45:06 +0400 Message-ID: <50038E42.1030508@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1342410314 2124 80.91.229.3 (16 Jul 2012 03:45:14 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 16 Jul 2012 03:45:14 +0000 (UTC) Cc: bzg@gnu.org, emacs-devel@gnu.org To: lekktu@gmail.com Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 16 05:45:14 2012 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 1SqcFC-0007NM-Pq for ged-emacs-devel@m.gmane.org; Mon, 16 Jul 2012 05:45:10 +0200 Original-Received: from localhost ([::1]:41110 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SqcFC-0006K1-6G for ged-emacs-devel@m.gmane.org; Sun, 15 Jul 2012 23:45:10 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:51659) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SqcF9-0006Jl-UI for emacs-devel@gnu.org; Sun, 15 Jul 2012 23:45:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SqcF9-0000Ty-4o for emacs-devel@gnu.org; Sun, 15 Jul 2012 23:45:07 -0400 Original-Received: from forward20.mail.yandex.net ([95.108.253.145]:49651) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SqcF7-0000QH-3B; Sun, 15 Jul 2012 23:45:05 -0400 Original-Received: from smtp17.mail.yandex.net (smtp17.mail.yandex.net [95.108.252.17]) by forward20.mail.yandex.net (Yandex) with ESMTP id 6B4E91041AE1; Mon, 16 Jul 2012 07:45:02 +0400 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1342410302; bh=1mCNuw2PAxBPA69N3LHFFlyf8QT8WfFBcU/HbdIzidI=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:Content-Type: Content-Transfer-Encoding; b=OSBCNc5RrReb6Ytuy7bpo/3CzsbxeyQh7zPZVuT/n1sUTeOrhRCZxkBKqygdSprGW Of7n2W5LHjq0aF9j6rK49O5F/X1ZdmsJr1uCIBlcQHTtzG5xBKvjwCNJx0ajqKOM66 JkbIQLaJH+42UZ8qKIujZnGE1c24V3Z6jBvPSj/g= Original-Received: from smtp17.mail.yandex.net (localhost [127.0.0.1]) by smtp17.mail.yandex.net (Yandex) with ESMTP id 3B07019001CF; Mon, 16 Jul 2012 07:45:02 +0400 (MSK) Original-Received: from 98-87.nwlink.spb.ru (98-87.nwlink.spb.ru [178.252.98.87]) by smtp17.mail.yandex.net (nwsmtp/Yandex) with ESMTP id j1SeS7tC-j1S4kbs0; Mon, 16 Jul 2012 07:45:01 +0400 X-Yandex-Rcpt-Suid: lekktu@gmail.com X-Yandex-Rcpt-Suid: bzg@gnu.org X-Yandex-Rcpt-Suid: emacs-devel@gnu.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1342410302; bh=1mCNuw2PAxBPA69N3LHFFlyf8QT8WfFBcU/HbdIzidI=; h=Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject: Content-Type:Content-Transfer-Encoding; b=o/g4sNbkXHvlaju+42CP7pxbJP2iTRQ0jRLZ7BdPENbze5dFy6SO2vZR5EhFdhOyB S+ZZiq3500+wbFRxb8U4IRWllIVO5ksRaAJAmk8+PRXjb0PB/UQdITd+vDNY/Us4CY jIQEVuUqAZpNwI5soPfJoOTSAX0qTRpby9wQygME= User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20120614 Thunderbird/13.0.1 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 95.108.253.145 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:151651 Archived-At: Juanma Barranquero writes: > On Mon, Jul 16, 2012 at 1:59 AM, Bastien wrote: > >> I read (substring "abc" 0 4) as "return the biggest substring >> between 0 and 4" -- even if the string does not have 4 characters. > > "Even if the string does not have 4 characters" is not even suggested > in substring's doc. FWIW, it's common behavior in many other programming languages. --Dmitry