user-documentation icon indicating copy to clipboard operation
user-documentation copied to clipboard

explanation for classname<C> is not clear.

Open yinping4256 opened this issue 5 years ago • 0 comments

Please complete the information below:

Where is the problem?

https://docs.hhvm.com/hack/built-in-types/classname

      • eg "The section describing how widgets work" - - -

What is the problem?

It lacks examples for how to use it. class C1 { ... } class C2 { public static classname<C1> $p1 = C1::class; public static function f(?classname<C1> $p): classname<C1> { ... } public static vec<classname<C1>> $p2 = vec[C1::class];}

this code does not make sense for a noob. more explanations are needed. For example, what exactly does "classname<C1>" mean? What is the difference between "classname<C1>" and "classname<C2>"??

      • eg "It doesn't explain that widgets are singletons" - - -

Please don't change anything below this point.


  • Build ID: HHVM=HHVM-4.57.0:HSL=v4.41.0:2020-05-21T18:29:34+0000:422a1f74d5f744078d1a5aba910cd7ced3e6f419
  • Page requested: /hack/expressions-and-operators/new
  • Page requested at: Thu, 25 Jun 2020 08:21:55 +0000
  • Controller: GuidePageController

yinping4256 avatar Jun 25 '20 08:06 yinping4256