[M3devel] Probably missing too much of development sycle, but WTF?

Jay jay.krell at cornell.edu
Wed May 20 01:05:49 CEST 2009


It is portable to all target platforms.
The approach with constants makes you have to "rewrite" Uerror.i3 for each target platform.
Rewriting headers is tedious, error prone, and very dangerous.
The approach with variables has just one implementation for all targets.
This approach is much safer.
 
 
I change the switch statements to if/elseif ladders.
Yes it is less efficient, but it is also usually an error path.
Yes it is source incompatible and I'm not happy about that, but I also like to keep platform specific code to a small minimum. It is a tradeoff.
 
 
 - Jay


________________________________
> Date: Tue, 19 May 2009 18:59:18 -0400
> From: rcoleburn at scires.com
> To: m3devel at elegosoft.com
> Subject: Re: [M3devel] Probably missing too much of development sycle, but WTF?
>
>
>
>
>
>
>
> Why is this more portable than using constants? especially since it breaks existing code?
>
> --Randy
>
>>>> 5/19/2009 5:37 PM>>>
>
> Yes a little unfortunate but very portable.
>
> - Jay (phone)
>
>
> On May 19, 2009, at 10:27 AM, Dragiša Duric> wrote:
>
>
>
>
> VARIABLES?
>
> Now every1 who was using CASE with error results has to adapt one's code?
>
> What is rationale here? Portability?
>
> TIA!
>
> INTERFACE Uerror;
>
> FROM Ctypes IMPORT int;
>
> (* CONST *)
>  VAR EACCES: int;
>  VAR EADDRINUSE: int;
>  VAR EADDRNOTAVAIL: int;
>  VAR EAGAIN: int;
>
>
>
>
>
>
> --
> Dragiša Duric 


More information about the M3devel mailing list