From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Roland Winkler" Newsgroups: gmane.emacs.devel Subject: Re: type checking for arbitrary lisp objects Date: Fri, 11 Apr 2014 14:22:57 -0500 Message-ID: <16657.80762.790748.21320@gargle.gargle.HOWL> References: <15888.20727.131941.21320@gargle.gargle.HOWL> <53483E8E.50406@dancol.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1397244213 26188 80.91.229.3 (11 Apr 2014 19:23:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 11 Apr 2014 19:23:33 +0000 (UTC) Cc: emacs-devel@gnu.org To: Daniel Colascione Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Apr 11 21:23:25 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 1WYh2q-0004X5-V0 for ged-emacs-devel@m.gmane.org; Fri, 11 Apr 2014 21:23:25 +0200 Original-Received: from localhost ([::1]:59547 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WYh2q-0007IK-I5 for ged-emacs-devel@m.gmane.org; Fri, 11 Apr 2014 15:23:24 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59796) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WYh2b-0006IH-Ql for emacs-devel@gnu.org; Fri, 11 Apr 2014 15:23:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WYh2S-00075Q-Pe for emacs-devel@gnu.org; Fri, 11 Apr 2014 15:23:09 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:33813) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WYh2S-00075K-Mg for emacs-devel@gnu.org; Fri, 11 Apr 2014 15:23:00 -0400 Original-Received: from lukas.physics.niu.edu ([131.156.85.221]:60970) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1WYh2S-0007Ya-2K; Fri, 11 Apr 2014 15:23:00 -0400 In-Reply-To: <53483E8E.50406@dancol.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::e 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:171404 Archived-At: On Fri Apr 11 2014 Daniel Colascione wrote: > Why not use cl-deftype? ...Interesting! - I guess the main difference to what I have in mind is that cl-deftype appears to require some lisp code for FORMS. I am thinking about replacing these forms by some more readable pattern such as the one I included in my first post. The function bbdb-check-type then compares an arbitrary lisp object against such pattern. I find it more readable and also more flexible to define patterns instead of hacking actual code.