[m-dev.] Here's an idea.

Tyson Richard DOWD trd at cs.mu.oz.au
Wed Sep 10 11:39:23 AEST 1997


Peter Schachte wrote:
> On Tue, 9 Sep 1997, Fergus Henderson wrote:
> 
> > > Also, C style formatting strings are pretty important, as almost every
> > > programmer is familiar with them. You would need to provide something 
> > > _significantly_ better to get people to change (I think in this case,
> > > "worse is better" is appropriate).
> > 
> > Yes, that's a good point.
> 
> I'm not so sure.  C-style format strings have two gaping flaws:  the lack of
> static type checking (unless you do some really fancy specialized type
> checking in the compiler), and the lack of extensibility.  I also find the
> separation of the format from the data to be at best a misfeature, as it
> requires an unnecessary (and error-prone) coordination of items, but I guess
> that's a matter of taste. 

I'm not proposing that we can't have a better alternative, but even
with those two flaws, C style formatting is well known, and in practice
causes few problems with what it's used for. (Well, at least that's my
guess - I'm not sure there are any figures on it). 

Certainly (IMHO) any alternative we propose should wait until we start
developing of framework of typeclasses for the standard library.
Then we can offer a much cleaner alternative.

-- 
       Tyson Dowd           #          Another great idea from the 
                            #            people who brought you
      trd at .cs.mu.oz.au      #               Beer Milkshakes!
http://www.cs.mu.oz.au/~trd #	         Confidence --- Red Dwarf



More information about the developers mailing list