triplescripts.org wiki User:Colby Russell/Bellard

User:Colby Russell/Bellard

From triplescripts.org wiki

I want to be able to accommodate programmers who author things in classic C style.

One idea I've toyed with is namespaces. The author declares a namespace and writes a bunch of top-level function definitions within a block. The compiler silently rewrites it into a class with all static methods. Downsides: unless we have deep introspection (i.e. a proper total parser), authors would still be required to prefix all function calls with the namespace name, in dotted form.

Separately, we might also consider folks who hate 1 module = 1 class = 1 file. Bellard's QuickJS is essentially one large monolithic file quickjs.c. Ruminate on this.

Cookies help us deliver our services. By using our services, you agree to our use of cookies.