Crosspost from user mailing list.
This is the outcome of the technical side of this years Pike conference.
We came to the conclusion that once the following list of items are
fixed we are ready to release Pike 7.8.
1. New syntax for getters and setters. The previous syntax where
mixed `->foo() {}
void `->=foo(mixed v) {}
created a virtual symbol foo in the class are now replaced with
mixed `foo() {}
void `=foo(mixed v) {}
I say replaced, but the old syntax remains. Perhaps it should be
changed to return syntax error before the release.
Also there was a discussion about how modifiers should be handled.
Currently the actual getter and setter functions are made private
and the "union" of them are used as the visibility for the virtual
symbol. This was argued against at the conference and I think the
consensus was that the modifiers should apply to the getter and
setter functions themselves and a "variable prototype" should be
used to change the visibility of the virtual symbol (with the
assumtion that typically you would want the virtual symbol public
anyway). One (bizarre) example would be
protected void foo;
public int `foo() { return x; }
private void `=foo(int y) { x = y*2; }
The new syntax was implemented promptly, but as I said the old one
still remains and nothing has been done w.r.t. the modifiers.
2. Adding a method for deprecating methods and symbols. This topic
sparked a debate of how new modifiers can be introduced without
having to reserve more keywords, with lots of ideas from other
languages tossed around. These syntaxes (syntacies? :) were brought
up
[weak, shared] int f();
@weak @shared int f();
weak shared int f();
where the last one (keyword solution look alike) was most discussed
for several reasons. It would not modify the look of the language
by introducing extra syntax, but it would also be complicated to
implement was the entire prototype has to be parsed backwards. It
was also noted that parametrization of modifiers would be
desirable, which would complicate the grammer even more.
weak shared(Top) int(1..3) f(string s);
The conclusion was that further studies needed to be done to solve
the new keyword issue. This was not considered a problem for
introducting a new deprecation method though, as it was not
something anyone was concerned about the looks for. The agreed upon
new keyword is __deprecated__, which when added to a symbol should
generate a warning when this symbol is used.
To supress deprecation warnings a new pragma directive,
no_deprecated_warnings, should be added.
3. To pave the way for "real" static (or "shared" as we would call it
to avoid confusion) the keyword "static" will be deprecated. While
it technically has nothing to do with the __deprecated__ mechanism,
its warnings will also be supressed by the new pragma.
The (hopefully) not used keyword "nomask", which is an alias for
"final" should also be deprecated.
It was agreed that a semantic change in protected to make protected
symbols accessible in other objects from the same class, was a good
ides.
4. The iterator API should be changed to not use LFUNs, but instead
more user friendly symbols. No compatibility layer that would
enable both old and new iterators at the same time will be
implemented due to the complexity (4 combinations of old/new
iterator objects being looped over by code using the old/new API).
There will of course be a #pike 7.6 mode to use the old API.
5. Support for mutliple backends to be selected between at runtime is
something that is needed, since a Pike compiled with epoll support
will not work on a system with only poll.
6. In some situations the Stdio.File and file.fd objects reference
each other and leak objects/file descriptors. This should be fixed
before Pike 7.8.
7. Martin Stjerholm wanted his work with Locale.Charset.EncodeError /
DecodeError to be finished before 7.8. It was also suggested that
Charset was moved to a top level module.
8. We need to ensure that there are no performance regressions in Pike
7.8. A quick profiling shows that we do have some performance
problems which needs to be addressed. Some work begun immediatly by
automatically finding between which versions performance dropped.
Another action item was to make Pikefarm parse and save the
benchmark data performed by xenofarm clients into a database and
provide an interface to be able to query and graph the status.
9. The HTTPS regressions since Pike 7.6 should be fixed before Pike
7.8. This was most likely fixed during the conference.
10. The precompiler should move to Tools.Standalone so that cmods
works as external modules properly.
11. One item that was discussed during the last day, and thus didn't
make the "official" list of 7.8 items was how zero_type/UNDEFINED
worked in Pike. After lot of discussions this was agreed upon:
class A
{
int x = 0;
int y = UNDEFINED;
}
A a = A();
zero_type( a->x ); // This should be 0
zero_type( a->y ); // This should be 1
zero_type( a->z ); // This should be 1
has_index( a, "x" ); // This should be 1
has_index( a, "y" ); // This should be 1
has_index( a, "z" ); // This should be 0
(So far this is how Pike currently behaves.)
mapping m = ([
"x" : 0,
"y" : UNDEFINED,
]);
zero_type( m->x ); // This should be 0
zero_type( m->y ); // This should be 1
zero_type( m->z ); // This should be 1
has_index( m, "x" ); // This should be 1
has_index( m, "y" ); // This should be 1
has_index( m, "z" ); // This should be 0
Here the expression m->y will return 0 with zero type 0. This is
due to all subtype flags being cleared by the mapping. For
symmetry with with the object case this was agreed to to be
changed.