[M3devel] FW: Win32/ScrollerVBTClass.m3

Tony Hosking hosking at cs.purdue.edu
Mon Dec 14 19:06:57 CET 2009


OK, cool.  :-)

On 14 Dec 2009, at 12:36, Jay K wrote:

> > So what did Jay recently do?  It sounded like he was migrating your code from the Windows implementation to the POSIX implementation.
> 
> I did not. How many times I need to say I didn't touch the Posix code?
> 
> 
> We have posix/scroller and win32/scroller.
> win32/scroller is a copy/edit of posix/scroller.
> You can hypothetically compile either on either.
> It is all portable.
> To alter the appearance, they are different.
> In the code that made win32/scroller there was some crashing.
> I fixed that.
> 
> 
> To the extent that they are the same, I suggest the
> two files be merged into one, with "if"s.
> You know, like, you have approximately three choices
> in these things.
> Separate files, #if, and if.
> But with Modula-3, #if goes away.
> But you still have "if", depending on what the code looks like.
> 
> 
> If the branches are wildly divergent, for some definition of "wild",
> then separate files are appropriate.
> If the divergence is small, for some definition of "small",
> then "if" is preferable.
> 
> 
> Depending on the degree, "if" can be confusing.
> Too man ifs, hard to read the code fast and see what
> actually runs.
> Separate files obviously can lead to redundancy.
> 
> 
> 
> In fact my first fix was to always use the Posix code.
> Since it worked and didn't crash.
> But then I fixed the crash instead.
> 
> 
>  - Jay

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20091214/fd1e747f/attachment-0002.html>


More information about the M3devel mailing list