A style guide for implementing the standard library would be helpful, especially specifying a way to make variables and functions that are not currently in std.c or std.go.
For example, I'm working on a TypeScript backend right now. One thing I'm working on implementing is the ability to choose between printing with console.log or printing to an HTML element. Right now I've implemented this by putting these lines at the top of std.ts
const OAK_TS__PSEUDO_CONSOLE = document.getElementById("oak-out");
function OAK_TS__PRINT(x: any){
if(OAK_TS__PSEUDO_CONSOLE) OAK_TS__PSEUDO_CONSOLE.innerHTML += x;
else console.log(x);
}
I guess this is also my proposal for naming these functions/variables. OAK_<file extension of the language>__<name of function or variable>
A style guide for implementing the standard library would be helpful, especially specifying a way to make variables and functions that are not currently in
std.corstd.go.For example, I'm working on a TypeScript backend right now. One thing I'm working on implementing is the ability to choose between printing with
console.logor printing to an HTML element. Right now I've implemented this by putting these lines at the top ofstd.tsI guess this is also my proposal for naming these functions/variables.
OAK_<file extension of the language>__<name of function or variable>