Garry's Mod Wiki

Revision Difference

proto#523655

A proto is a <page>function</page> prototype that has been described in code but not initialized as a callable object. You can browse its bytecode and debug information with the jit.util functions, but it cannot be executed. A proto has the same relationship with a function as classes have with its objects in OOP languages: a class can have multiple object instances, but objects are only of single class type. A proto has the same relationship with a function as classes have with its objects in OOP languages: a class can have multiple object instances, but objects are only of single class type. In the same way, protos can have multiple function instances but there is only a single proto describing those instances. See <page>jit.util.funck</page> for an example.