Most functions in OpenGL return integers (type int).
The glCreateShader() function, for example,
returns an int regardless of whether the function
is creating a fragment shader or a vertex shader. Obviously, returning a different
type depending on whether a fragment shader or a vertex shader was requested
would require a dependent type system. As Java clearly does not have dependent types, the
jcanephora package
provides a shaderCompileVertex() function that
returns a value of type JCGLVertexShaderType and a
shaderCompileFragment() function that returns
a value of type JCGLFragmentShaderType, eliminating
at compile-time the possibility of confusing the two. The package takes a similar
approach to static safety throughout.