Web Images Videos Maps News Shopping Gmail more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Message from discussion writing out expressions prepended by #.
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Erik Naggum  
View profile  
 More options Apr 27 2001, 10:34 pm
Newsgroups: comp.lang.lisp
From: Erik Naggum <e...@naggum.net>
Date: Sat, 28 Apr 2001 02:34:52 GMT
Local: Fri, Apr 27 2001 10:34 pm
Subject: Re: writing out expressions prepended by #.
* Kent M Pitman

> The only disadvantage of #.(...) is that a lot of people bind *read-eval*
> when reading forms, and in that case you'll lose on the re-read.  To
> counteract that, you might be better off to take some other dispatch on #
> and make something similar to #S but with user-definable characteristics.
:
> I seem to recall I tried to get the committee to generalize its effect
> but for some reason it didn't go through--maybe it was after the feature
> freeze...

  I have taken to define #/ as a reader-macro akin to the format control,
  to read _registered_ types with associated functions, as I ran out of
  convenient ways to specify classes and such.

  In this particular case, #/point/(1 2 3), would require a registered type
  named point with an associated reader function that that would read as
  many arguments as it needs using whatever printer controls and reader
  functions it pleased, but it would of course be the question of more or
  less reasoanble usages, as with every other powerful mechanism.  E.g.,
  #/ip/192.168.150.155/26 could mean the address and a 26-bit mask for
  routing or matching purposes, whild #/ip/192.168.150.155:5555 could mean
  an address and a port number.  And #/md5/0123456789abcdeffedcba9876543210
  could mean the hexadecimal representation of an MD5 sum.

  Given this framework, would be a very simple task to supply macros that
  defined and registered reader functions and corresponding print-object
  methods for new classes.

#:Erik
--
  I found no peace in solitude.
  I found no chaos in catastrophe.
                        -- :wumpscut:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google