On Sat, Jul 21, 2012 at 10:48 AM, David A. Wheeler
<dwhee...@dwheeler.com> wrote:
> Alan Manuel Gloria:
>> Okay, so somehow everything is going to be prefixed with (readable
>> ...) and now everyone is arguing about the exact name.  In the mean
>> time I'll just reorg the code, I hope the name gets settled by the
>> time I finish and I'll just do some sort of s/whatever/whatever/
>
> Sounds like a perfect plan.  I don't even know if any names will change, but 
> if they do, it'd certainly be a trivial substitution.  There's no reason to 
> wait for *that*.
>
> Can you repost your updated plan, with not just function names but their 
> input/output description? Or do you agree with the basic interfaces I 
> outlined?

Okay, here's the public interface:

define-module
  readable sweet-impl
  :export
  \\
  . ; tier readers
  . curly-infix-read ; :: Port -> Object
  . modern-read ; :: Port -> Object
  . sweet-read ; :: Port -> Object
  . ; replacement
  . replace-read ; :: (Port -> Object) -> void -- replace the
implementation's reader
  . restore-default-read ; void -- restore the implementation's default reader
  . ; testing
  . ; (compare-read-file foo-read "filename")
  . ; open the file named "filename", and read each expression
  . ; in the file using the implementation's default reader and the given reader
  . ; Returns three (values ...): The first it #t if the file is the same for
  . ; both built-in and the given reader, the 2nd and 3rd are the top-level
  . ; expression that failed to match, as read by the built-in (2nd) and
  . ; as read by the given (3rd) reader.  On success the 2nd and 3rd
  . ; values are just '()
  . compare-read-file ; :: (Port -> Object) -> String -> (Bool, Maybe
Object, Maybe Object)
  . ; like the above, but just the given string
  . compare-read-string ; :: (Port -> Object) -> String -> (Bool,
Maybe Object, Maybe Object)

As for the internal portability API, I think I also need to provide a
portable way to replace the reader - witness the hackery that goes on
to "seamlessly" replace Guile's reader on 1.6, 1.8 AND 2.0.

Sincerely,
AmkG

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Readable-discuss mailing list
Readable-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/readable-discuss

Reply via email to