You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note that ppx_update is simple, so if you update with a long expression, that expression will be computed twice.
Maybe you could fix this in the syntax extension so that users don't have to worry about it?
Currently you generate code that looks like if <lexpr>.f == <rexpr> then () else <lexpr>.f <- <rexpr>, but I suppose you could just as easily generate let field = <rexpr> and obj = <lexpr> in if obj.f == field then () else obj.f <- field, which does not suffer from this issue.
The text was updated successfully, but these errors were encountered:
The README says:
Maybe you could fix this in the syntax extension so that users don't have to worry about it?
Currently you generate code that looks like
if <lexpr>.f == <rexpr> then () else <lexpr>.f <- <rexpr>
, but I suppose you could just as easily generatelet field = <rexpr> and obj = <lexpr> in if obj.f == field then () else obj.f <- field
, which does not suffer from this issue.The text was updated successfully, but these errors were encountered: