From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Lucy Newsgroups: gmane.lisp.guile.devel Subject: Re: expression Date: Wed, 23 Jun 2010 18:23:45 -0500 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1277335456 457 80.91.229.12 (23 Jun 2010 23:24:16 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 23 Jun 2010 23:24:16 +0000 (UTC) Cc: guile-devel@gnu.org To: No Itisnt Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Thu Jun 24 01:24:15 2010 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ORZIk-0007xx-Sf for guile-devel@m.gmane.org; Thu, 24 Jun 2010 01:24:15 +0200 Original-Received: from localhost ([127.0.0.1]:39158 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ORZIk-0000jw-6J for guile-devel@m.gmane.org; Wed, 23 Jun 2010 19:24:14 -0400 Original-Received: from [140.186.70.92] (port=37768 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ORZIe-0000i5-2U for guile-devel@gnu.org; Wed, 23 Jun 2010 19:24:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1ORZIc-0000R0-Ps for guile-devel@gnu.org; Wed, 23 Jun 2010 19:24:07 -0400 Original-Received: from mail-gw0-f41.google.com ([74.125.83.41]:56142) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ORZIc-0000QL-G5 for guile-devel@gnu.org; Wed, 23 Jun 2010 19:24:06 -0400 Original-Received: by gwb20 with SMTP id 20so661327gwb.0 for ; Wed, 23 Jun 2010 16:24:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:sender:received :in-reply-to:references:from:date:x-google-sender-auth:message-id :subject:to:cc:content-type:content-transfer-encoding; bh=jRTkAABvLDpY6D0TFuY3qo090+BPqGzaJd5pg3UmcPM=; b=vyskucyzV9GqlIX//4nQssEjc05+sOepmIBaEaEGvNYzzHzQ2CFy7w3KbFKiYNiwMS B2vjLNuYZfduFun1P0+fOh7B+l3dnK3kn+gh/mU4QfKZMO82uDHCYT9h3ac4TmH0Cayi FV0fWBTJaCLanDti/bIODlVTZNAjjqgCICQro= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; b=qU6kdkc+m3ZtWmNnZJAgPeadT9Y+YS+JU/ReCuUcKEJO5RI2LN/HP6XwY+Mloa7x/C QDoLJHDbP0+L2QhXq1x0mSDSzpFOwHkWf2Vn6he0P+z+10MLZTvijB6m9/RCembRhByv uUt1G/ypApqTtOCUjzyuhGLG0WRN+1f8PefLc= Original-Received: by 10.101.135.2 with SMTP id m2mr7281917ann.0.1277335445667; Wed, 23 Jun 2010 16:24:05 -0700 (PDT) Original-Received: by 10.101.68.9 with HTTP; Wed, 23 Jun 2010 16:23:45 -0700 (PDT) In-Reply-To: X-Google-Sender-Auth: QZpVIai2I2JdJsmxEIqHr1nsKvs X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:10556 Archived-At: Doesn't look like it ignores it: scheme@(guile-user)> ,c (begin (set! x 1)) Disassembly of #: 0 (assert-nargs-ee/locals 0) 2 (make-int8:1) ;; 1 3 (load-symbol "x") ;; x 8 (link-now) 9 (variable-set) 10 (void) 11 (return) scheme@(guile-user)> ,c (begin (set! x 1) *unspecified*) Disassembly of #: 0 (assert-nargs-ee/locals 0) 2 (make-int8:1) ;; 1 3 (load-symbol "x") ;; x 8 (link-now) 9 (variable-set) 10 (load-symbol "*unspecified*") ;; *unspecified* 27 (link-now) 28 (variable-ref) 29 (return) scheme@(guile-user)> If it's idiomatic I'll do that till I find something else though. Thanks! On Wed, Jun 23, 2010 at 6:14 PM, No Itisnt wrote= : > On Wed, Jun 23, 2010 at 4:09 PM, Michael Lucy wr= ote: >> Hey, >> >> Is there any scheme expression that will just get ignored when the >> scheme code is compiled? >> >> I'm generating some code with a function like: >> >> (define (gen-update-ab updatea updateb) >> =A0`(begin >> =A0 =A0 ,(if updatea `(set! a (+ a 1)) `(donothing)) >> =A0 =A0 ,(if updateb `(set! b (+ b 1)) `(donothing)))) >> >> And ideally I could replace the donothing function with something that >> will get discarded during compilation. > > I'm not sure if Guile will discard the result, but I think > *unspecified* is the idiomatic value for those sorts of situations. >