[Prev][Next][Index][Thread]

Re: Extending format strings.



"Michael T. Richter" <mtr@ottawa.com> wrote in message
Y0YP5.55497$n9.1423265@news2.rdc1.on.home.com">news:Y0YP5.55497$n9.1423265@news2.rdc1.on.home.com...

> (Have I mentioned yet how much I love Dylan?  I opened up a library I've
> never seen before in my life and that I wasn't sure what to look for and
> figured out exactly how format's logic works on the first try.  I tend to
> shudder at the prospect of opening up *any* C++ library I didn't write
> myself....)

I can relate to all of this. :-)

>I'm going to have to brush up on the sealing protocol, but it looks to me
>like I can't extend print-message for any subclasses of <string>,
><character> or <symbol> from the above code.  I can, however, extend
>print-message for any subclass of <object> or <condition> that isn't sealed
>by the above bits.  Am I reading that right?

Your reading of sealing is correct.

> I'm a little fuzzy on the distinction between %= and %S.  When would I use
> which one?  Why?

%= is when you don't know what you're going to be printing, it's just some
subclass of object, anything goes. %S is when you know what you're going to
be printing and you'd like some type safety.

- Rob.





Follow-Ups: References: