tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] 4 bugfixes for Rob Landley's revision 470


From: Simon 'corecode' Schubert
Subject: Re: [Tinycc-devel] 4 bugfixes for Rob Landley's revision 470
Date: Thu, 06 Sep 2007 02:14:30 +0200
User-agent: Thunderbird 1.5.0.12 (X11/20070604)

Rob Landley wrote:
Trailing whitespace is annoying because it's not visible to programmers, but if we're going to skip one kind of whitespace I don't see why not to skip all of 'em.

(Windows developers thing \r is _special_ whitespace.  I don't.)

No, the windows text file convention specifies \r\n as newline. Like the majority of internet protocols. Actually, if you fopen() a text file with mode "rt" it does convert \r\n to \n.

In any case, skipping trailing whitespace changes the semantics of \, so that's not a wise thing to do.

Nevertheless I wonder if it might be a nice educational experience to
write a new tcc (or however it would be called) from scratch, using nice
function and variable names, a sane scoping (not everything as globals)
and broken up into multiple files.  Of course that sounds like a lot of
work as well :)

Feel free. It would be about as much of an educational experience to morph the existing tcc into something with nice function and variable names, sane scoping, and broken up into multiple files. You'll notice I already broke off a tcc.h from tcc.c. That's the tip of the iceberg of what it _needs_...

I don't think those two things are comparable. One thing is designing and implementing a compiler. The other thing is refactoring code to make it readable. I'd always go for the first choice, time and passion permitting.

cheers
  simon




reply via email to

[Prev in Thread] Current Thread [Next in Thread]