Currently View operations except validate and read doesn't depend on zserio expressions. When validation doesn't pass, the behavior of all methods like write, bitsizeof, etc. is UNDEFINED. This solution was chosen to simplify implementation and possibly to slightly improve performance.
We can reconsider if the View should be more strict and check expressions in all methods. But we should also defined what to do in particular cases.
Note that the extra validation step is quite a performance drop since it needs an extra tree traversal.
Currently View operations except
validateandreaddoesn't depend on zserio expressions. When validation doesn't pass, the behavior of all methods likewrite,bitsizeof, etc. isUNDEFINED. This solution was chosen to simplify implementation and possibly to slightly improve performance.We can reconsider if the View should be more strict and check expressions in all methods. But we should also defined what to do in particular cases.
Note that the extra validation step is quite a performance drop since it needs an extra tree traversal.