From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-il1-x135.google.com (mail-il1-x135.google.com [IPv6:2607:f8b0:4864:20::135]) by sourceware.org (Postfix) with ESMTPS id 4604D3858400 for ; Wed, 29 Dec 2021 22:12:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4604D3858400 Received: by mail-il1-x135.google.com with SMTP id d14so17573742ila.1 for ; Wed, 29 Dec 2021 14:12:50 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=YBBHHL0ACzOs57w7kLTvBVKgHOLLdhF1WKQDENDuomE=; b=lkF1Nk0i/1R9cro+SCNP+UwCWrEjXCCcS5tvkpIP7hx2XAe8v3sJMcCntfkoOk4BsW X0YlMeWirD1skPSDO8X0+fddorM1P+0cqPH5ZLWRi5aPeTsj3eeJxxHHbCe/6un9CpO2 01E1zWY7HezguuOS6Doh3jVUwwcYMV6wUOltI4sxNWDSMO6VIBTgmx/jUFAH8MtmYdHO 8r11KeI0G7TKTT2BLvyP/NhXvDrm7i/qkK1+McMxrIpgglX1eWD/jfH4Zj8TU3Bg20HE cJkSywwZOOT/rEIn1kIPoZqhWpMAMHjK8PxBdS+iUoASEnJbST/lsj4eIFM9pZCULCzd BYwA== X-Gm-Message-State: AOAM531LoPXfBxoL9ehRgHuw3sN0jMi6qGgWXDaE4vvaYlIEFBlPVWdT f7o3SutqCIp1m7h543iFYmI0Gu0my6y9Gz/98kO2tAgbnPE= X-Google-Smtp-Source: ABdhPJxCVohXHsYQInM+Hzw9Ybs9VoG9n8SyfFleBy2XzFbU4doIJ+UYT2TWk1BuH5KnyIEleIV2S54QTqj9uQ26bJg= X-Received: by 2002:a05:6e02:1949:: with SMTP id x9mr12362234ilu.84.1640815968541; Wed, 29 Dec 2021 14:12:48 -0800 (PST) MIME-Version: 1.0 From: Panicz Maciej Godek Date: Wed, 29 Dec 2021 23:12:37 +0100 Message-ID: Subject: Type information seems to be erased in macros To: kawa@sourceware.org X-Spam-Status: No, score=-0.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: kawa@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Kawa mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Dec 2021 22:12:51 -0000 Hi, I have defined a macro: (define-syntax-rule (with-translation screen (x y) . actions) (let ((x! x) (y! y)) (screen:translate! x! y!) (let ((result (begin . actions))) (screen:translate! (- x!) (- y!)) result))) which (presumably) operates on Screen interface, which provides translate! method. I use it in a context which makes it clear that the type of the first argument passed to with-translation is Screen: (define (draw! object #!optional (screen::Screen (current-screen)))::Extent ... (with-translation screen (left top) ...) ...) However, when I import (to the REPL) a module containing this code, I get the following complaint near the use of the with-translation macro: warning - no known slot 'translate!' in java.lang.Object Does the macro system erase type information from objects? If I add explicit casts in the macro, is it likely to cause some performance penalty?