I agree that for any real world applications it wouldn't affect
performance, I just didn't want to leave any holes in implementation.
Ill test couple of solutions for arrays to see how it works.

Yeah, checks are also in place for multiple constructor calls.

Regarding your suggestion to draft RFC for passing by value of immutable
objects, I am up for that if this RFC passes voting.

2018-02-23 19:23 GMT+01:00 Niklas Keller <m...@kelunik.com>:

> Hey,
> > Problem with checking array on assignment is that it could be N
> dimensions
> > deep and one would have perform check for each item in each dimension for
> > mutable values which could have some performance implications.
> if you want to enforce that in userland now, you have even higher
> performance implications. I wouldn't worry about the performance of
> edge cases and take away a feature for everybody else because of that.
> If there's a better internal implementation, it can always be improved
> later.
> > Regarding constructor call, upon first initialization of object, you are
> > allowed to assign values to properties, after constructor is executed,
> > object is locked. If you try to call again constructor on the same
> object it
> > would fail as soon as execution reaches first assignment statement
> because
> > object was already marked as locked.
> Sounds good! So it's already implemented basically.
> > I agree that it would be better to pass by value but I am not sure how
> would
> > that impact the way we currently manage objects in object store.
> If we both agree it would be the better way, why not draft an RFC for
> it and find someone who knows how to implement it?
> Regards, Niklas

Silvio Marijić
Software Engineer

Reply via email to