TSa Thomas.Sandlass-at-barco.com |Perl 6| wrote:

Finally combine that with the wish to allow literals of class A. Let's
assume the grammar is patched to parse integer literals as As. Then
with the above 7.inc gives an error because 7 is not mutable. So as
I outlined before I want to care for the callers constraint. Perl 6
lacks a syntax for that.


I'll digest that more later. For these issues, I have my thoughts stacked a few plates down and don't want to lose my productivity right now.

But, I'm thinking along the lines of Pascal and C++. You can't pass a non-lvalue "by reference", period. (5)++ is just plain wrong. The matching rules for MMD should be at least as good as C++ overloading, to have a version of the function that is for non-lvalues and one that is for lvalues. Also, Perl 6 synopses mentions both 'rw' and 'ref' separately. I think there will be a choice of copy/return or ref binding for 'rw', which allows for differing types; and bind directly with 'ref' which allows for custom container ties to work live rather than just get an update at the end. We need a clear summary of expectations; that is, what do we want to be able to accomplish. Then refactor that into a set of real features that span the target feature set.

--John

Reply via email to