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

Re: pretty fonts in sources

    Date: Tue, 2 Jun 87 21:20 EDT
    From: Barry Margolin <barmar@Think.COM>

	But be warned: there are some subtle bugs due to character styles in
	source code. Those two lines look the same to you
		(chaos:connect net:*local-host* "FOO")
		(chaos:connect net:*local-host* 1"FOO"0)
	but not to the machine, because they are written in different styles
	(namely NIL.NIL.NIL vs. FIX.ROMAN.NIL) and those strings "FOO" are
	passed *with* style information into the lisp environment - I'd call
	this brain-damaged!

    Yes, there seem to be a bunch of bugs related to fat strings being
    passed to functions that expect thin strings.  We had lots of problems
    here during our conversion to 7.0 because some people liked to put all
    their source files in bold.

Who says these are bugs, and who said you can just put whatever source
code you want into bold?

What your "some people" really wanted to do was to set their
default character-style to bold, not set all their characters
to bold.  (And if they did, Juergen's two examples would not
have looked the same).

I understand the surprising aspect of Juergen's examples.
But if we made "2foo0" not be bold, consider the highly
surprising (and inconvenient) result of

(format t "This is 2bold0.")

printing out

This is bold.

instead of

This is 2bold0.

It's a trade-off.  A fair bit of thought went into choosing the
current behaviour, and it is 3not0 a bug.  You may argue it's
a 3mistake0, of course, but I personally find being able to
put boldface, etc, into strings to be far more useful than
any problems it causes.