Summary:
We used to have a huge switch statement switching on the operator string read from json in order to read a graph from json source. However, this approach had two problems:
(1) It used a custom string literal, which is hashed to an integer. See the related task for issues with that.
(2) That switch had large cyclomatic complexity - it would have been hard to read and maintain.
We replace all that with a table of functions indexed by string.
Summary: We used to have a huge switch statement switching on the operator string read from json in order to read a graph from json source. However, this approach had two problems: (1) It used a custom string literal, which is hashed to an integer. See the related task for issues with that. (2) That switch had large cyclomatic complexity - it would have been hard to read and maintain.
We replace all that with a table of functions indexed by string.
Differential Revision: D41041374