User:Colby Russell/Bellard: Difference between revisions

fix 111 typo
(Created page with "I want to be able to accommodate programs authored in classic C style. One idea I've toyed with is namespaces. The author declares a namespace and writes a bunch of top-leve...")
 
(fix 111 typo)
 
(One intermediate revision by the same user not shown)
Line 1:
I want to be able to accommodate programsprogrammers authoredwho 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 filesfile]]. Bellard's QuickJS is essentially one large monolithic file quickjs.c. Ruminate on this.