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: Rob Landley
Subject: Re: [Tinycc-devel] 4 bugfixes for Rob Landley's revision 470
Date: Wed, 5 Sep 2007 20:46:30 -0500
User-agent: KMail/1.9.6

On Wednesday 05 September 2007 7:14:30 pm Simon 'corecode' Schubert wrote:
> 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.

I don't do windows.

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

On Linux?  That's not in the man page...

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

Is there ever any code that would compile before, but wouldn't now?

> >> 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.

Then do so.  I am not interested in that.  I'm interested in taking something 
that works now (tcc) and making it better.  If you want to start over from 
scratch, you do not need my permission.

> cheers
>    simon

Rob
-- 
"One of my most productive days was throwing away 1000 lines of code."
  - Ken Thompson.




reply via email to

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