Skip to content

Coding conventions

Andrew Binstock edited this page May 26, 2024 · 7 revisions

This page contains coding conventions used in the Jacobin code base. Note that many of these conventions grew organically, as needs became clarified. That means that some early code might not strictly follow the conventions. Bringing such code to our attention is a welcome contribution.

gfunctions

The error block returned by gfunctions contains an error message whose syntax consists of the name of the gfunction throwing the exception, followed immediately by a colon (:), followed by the actual error description. Note that the description might contain colons, but the first colon will always be a separator between gfunction name and description.

gfunctions vs. native functions

gfunctions are Java library functions implemented in golang. Native functions are JDK functions written by the JDK team in a native language, generally C++. Native functions are identified in Java by use of the native keyword.

golang vs. go

Wherever reasonable, we use golang to refer to the language, rather than go. This allows us to search the code base for instances of the go keyword more efficiently.

Clone this wiki locally