eo icon indicating copy to clipboard operation
eo copied to clipboard

rewrite GOTO in EO, using TRY object

Open yegor256 opened this issue 3 years ago • 4 comments

I think it's possible to remove Java from the goto atom and rewrite it in pure EO, using the try atom. Let's try.

yegor256 avatar Dec 14 '22 07:12 yegor256

@mximp please, help here

yegor256 avatar Dec 14 '22 07:12 yegor256

blocked by #1570

mximp avatar Dec 15 '22 15:12 mximp

@yegor256 simple implementation (in draft PR) implies couple of limitations:

  1. nested goto's are not allowed
  2. since goto relies on while it performs additional dataization which is not always intuitively clear and need to be taken into account.

At the moment I cannot find a way to implement EO version of goto without using bool.while. Also I couldn't find a way to overcome above limitations. It seems that it would require much more complex code in EO (if even possible).

So the question is: are we ok with those limitations of goto?. Otherwise I would suggest to leave goto as an atom.

mximp avatar Dec 19 '22 13:12 mximp

This task is blocked until the way is found to avoid double dataization.

mximp avatar Jan 09 '23 12:01 mximp