On Thu, Jan 01, 2015 at 01:19:06AM -0800, Andrei Alexandrescu via Digitalmars-d wrote: > On 12/31/14 1:12 PM, Dicebot wrote: > >I don't feel like any small change in DDOC will make me like/use it. > > I'm envisioning quite an interesting possibility in which certain > constructs are automatically converted to macros: > > `hello world` --> $(BACKQUOTED hello world) > "hello world" --> $(QUOTED hello world) > 'hello world' --> $(SQUOTED hello world) > _hello world_ --> $(UNDERLINED hello world) > *hello world* --> $(STARRED hello world) > > ... and such. Then generating nice formatting for each of these > constructs is achieved by simply defining these macros appropriately. [...]
Nice idea, but I think _..._ will have to be left out, due to the prevalence of special meanings of _ currently in use. For example, _abc currently means "abc" without any automatic highlighting (e.g., if abc were a parameter or function name); _abc: at the beginning of a line means a literal word "abc" where otherwise abc: would mean a section heading "abc"; and abc_def: means a section heading with two words "abc def". I anticipate that overloading _ to do even more than this will only lead to a nasty mess where it's impossible for the non-expert to figure out what it actually means. T -- The early bird gets the worm. Moral: ewww...