Rafael Garcia-Suarez wrote: >So, if I understand that last paragraph, that implies new syntax ? Depends what you count as new syntax. Certainly some new semantics, including new builtin functions, but we don't need to add to perly.y. I imagine something like $pkg = package_metaobject("Foo::Bar"); # or: $pkg = new_anon_package(); $obj = $pkg->new(); # unambiguously call class method $obj = bless({}, $pkg); # only way to bless into anon package $pkg = ref_metaobject($obj); # only for blessed objects use strict_packages; $obj = Foo::Bar->new(); # error Obvious sources of trouble: $pkg = package_metaobject("Foo::Bar"); bless($pkg, "Heh::Heh"); $obj = $pkg->new; # Foo::Bar->new or Heh::Heh->new? sub new { # current idiom, breaks if $_[0] is a package metaobject my $class = ref($_[0]) || $_[0]; } $pkg = new_anon_package(); $obj = bless({}, $pkg); $class = ref($pkg); # surprising metaobject or useless string? So we need some non-trivial thought about how the semantics will fit together. I'm determined that we won't get the kind of ill-thought-out mess we've so often had before. -zeframThread Previous | Thread Next