On 29/07/11 13:09, Aleksander Morgado wrote: > Hi Georg, > >> >> I have chosen LZW filter task. The code looks ok (maybe some gotos to >> refactor), it compiles, and it seems to work. So what has to be done? >> > > At least unit tests are missing. > > I also dislike the use of gotos, but I found them quite handy to keep > the flow of the state in the filtes, so crossed feelings about that. I > wouldn't refactor them if they work ok. >
I dislike goto's too. I wrote those goto's in the original code. There is a metodology in how they are used and their only purpose is to keep state when we run out of buffer space without having to split and blurr the main algorithm. I do not know of any clearer way of doing this without continuations (lisp, python) or lazy evaluation (haskell), but if you do I would love to read it :) Thanks for maintaining that code, if you have any problems with it I can try to take a look at it again. JP