From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mailtransmit05.runbox.com (mailtransmit05.runbox.com [IPv6:2a0c:5a00:149::26]) by sourceware.org (Postfix) with ESMTPS id C68303858428 for ; Thu, 11 Apr 2024 01:01:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C68303858428 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=bothner.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=bothner.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org C68303858428 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a0c:5a00:149::26 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712797281; cv=none; b=JbzQS+L7zfcsNytGRC+3tzJNW/Yyn4wdFo4rZpIwqJAXe5lU7Y9gjqCEkAbIZ75u2NG2NRvU85985XGjXsSR0U1THo0v639KVnMug1ZM8x00nmfgLHI5tQT5UW01U1UT3/8N5+fB7p8FS7oXBy9nUoJlMgfeUnwYPQCy0nhp2Pk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712797281; c=relaxed/simple; bh=36iUXbd/+7/KSpd4+J1ZKOgQH1hHUbON0Xc2ScDiREw=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=NLD9UadbvWI2P2U9g9rxo/8xtw09mzLLw6okzm1Yb0wAwd5k10syY8SU5Bknrfz6efweh2WUCQA3tAzdinJ6gmdQKHfdnYZQZ25pF9HBVKfwzjIxAL31h2+GgdoXcbFHN1xznw/kIiCNTsVytJ/dF373MAzivdV7Ir+ADlvV7AA= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from mailtransmit02.runbox ([10.9.9.162] helo=aibo.runbox.com) by mailtransmit05.runbox.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1ruioW-000Kms-1M for kawa@sourceware.org; Thu, 11 Apr 2024 03:01:16 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=bothner.com ; s=selector2; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:To:Subject:MIME-Version:Date:Message-ID; bh=n48bP7HhiUpZvFGVztfoZwZ/VDMIwWaWf/e9gso+Azo=; b=mVvZ9n4w5IcL6lIoirkqu9bdTT wpBde6EWqMGOjUYGKsNe1NsqPTjJohzFXFfG42W69Af4V0khrhrdaIPZ4lg+r7uFQtLcWe4P1P6wC IMtji7VmEOblgEgmA7X41i8DCxHyCnl1hUKqP0OHJTD6lP2d4K7nBFufVOmeZ0lH4QkndmVytxm9c sUol77wAxo3f8ShAD8jUAQyVC/5DoxLGadGUGRR6CIeBQclGGReLOi4NMkLw4WqJo+l3JjW5AaJjf wHwIxzf1SuO0BtV9RswjrxtAi3ohc3MrMdZAs94AV7JcVubgXWkGpSkGkhrIEynWEQGa0wZmGt1cJ YY4eCi3g==; Received: from [10.9.9.74] (helo=submission03.runbox) by mailtransmit02.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1ruioV-0003q9-J5; Thu, 11 Apr 2024 03:01:15 +0200 Received: by submission03.runbox with esmtpsa [Authenticated ID (524175)] (TLS1.2:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.93) id 1ruioF-008QQe-Vv; Thu, 11 Apr 2024 03:01:00 +0200 Message-ID: <2dec7074-c846-413c-a247-18bae45813d7@bothner.com> Date: Wed, 10 Apr 2024 18:00:55 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: how to know if a variable is defined To: Damien Mattei , kawa mailing list References: Content-Language: en-US From: Per Bothner In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 4/10/24 14:49, Damien Mattei via Kawa wrote: > hello, > > is there a way to know if a variable is defined in Kawa? > > (like 'identifier-binding' in Racket) If you need to know if a variable is bound in the dynamic environment, you could perhaps use eval wrapped in an exception handler. There are probably better ways, but I don't remember off-hand. Can't think of anything to use if you need information about lexical bindings. I supposed you could implemented identifier-binding or something similar. -- --Per Bothner per@bothner.com http://per.bothner.com/