User:Colby Russell/Bellard: Difference between revisions

fix 111 typo
(programmers, not programs)
(fix 111 typo)
 
Line 3:
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 filesfile]]. Bellard's QuickJS is essentially one large monolithic file quickjs.c. Ruminate on this.