Why is generic instantiation syntax disallowed in Hack?
为什么是通用语法不允许实例化的黑客?
Another way of handling this problem would be to throw an exception whenever a run-time instantiation of the generic class does not include a needed constructor.
处理该问题的另一种方法是:只要泛型类的运行时实例化没有包括所需构造函数,就抛出异常。
Throw an exception whenever a run-time instantiation of the generic class does not include a needed constructor.
只要泛型类的运行时实例化没有包括所需的构造函数,就抛出异常。
Instantiation of a generic type or calls to existing generic methods can be added, deleted, or changed.
可以添加、删除或更改泛型类型的实例化或对现有泛型方法的调用。
Instantiation of a generic type or calls to existing generic methods can be added, deleted, or changed.
可以添加、删除或更改泛型类型的实例化或对现有泛型方法的调用。
应用推荐