[m-users.] Bug in posix.readdir (fixed)

Volker Wysk post at volker-wysk.de
Mon Oct 14 13:18:28 AEDT 2019


Am Montag, den 14.10.2019, 13:06 +1100 schrieb Zoltan Somogyi:
> 
> On Mon, 14 Oct 2019 03:58:18 +0200, Volker Wysk <post at volker-wysk.de>
> wrote:
> > Not sure if I understand correctly, but wouldn't it just be one
> > level
> > of switching:
> > 
> >     readdir(Dir, Res, !IO),
> >     (
> >         Res = ok(yes(File)),
> > 	...
> >     ;
> > 	Res = ok(no),
> > 	...
> >     ; 
> > 	Res = error(Err),
> > 	...
> >     )
> 
> That is actually two levels of switching: first ok vs error, then
> (in the ok case) yes vs no. The fact that you can flatten that out
> in the surface syntax does not change the fact that the generated
> code does two nested switches.

Okay. But would that be a bad thing? (I'm just wondering.)

Bye
Volker



More information about the users mailing list