Page MenuHomePhabricator

WikiLambda: Evaluate if ZList constructor needs to allow for both normal and canonical inputs
Closed, ResolvedPublic


Currently ZObjects/ZList.php constructor can take either a list of ZObjects or a head and tail. Considering that currently ZList is called from ZObjectFactory, it's possible that the input in normal form is no longer needed.

This task includes:

  • Re evaluate if the extra complexity in ZList constructor is necessary
  • If not, remove head-tail inputs and just take a list
  • Change tests accordingly

Event Timeline

I think this task can also be expanded: Do we need internal normal handling of ZLists at all? We are receiving canonical inputs, and we can serialize them in canonical or normal form. We can have ZList data to be built as a canonical array and handle its serialization differently depending on what form is needed.

Change 743402 had a related patch set uploaded (by Genoveva Galarza; author: Genoveva Galarza):

[mediawiki/extensions/WikiLambda@master] ZList: Remove head and tail from constructor

Change 743402 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] ZList: Remove head and tail from constructor