Contexts/namespaces naming in modules
Posted: Thu May 14, 2009 11:27 am
I am considering to title-case all contexts/namespaces names used in standard modules shipped with the source distribution and installers which are currently lower-case.
This has been discussed earlier, but as it may break existing code I am interested to hear the community about this again and before changint it.
The following prefixes would be affected:
canvas.lsp - cv -> Cv
crypto.lsp - crypto -> Crypto
postscript.lsp - ps -> Ps
stat.lsp - stat -> Stat
sqlite3.lsp -> sql3 -> Sql3
unix.lsp -> unix -> Unix
zlib.lsp -> zlib -> Zlib
The following prefixes would stay as they are:
cgi.lsp - CGI
ftp.lsp - FTP
gmp.lsp - GMP
indix.lsp - INFIX (or should it be Infix ?)
mysql.lsp - MySQL
pop3.lsp - POP3
postgres.lsp - PgSQL
xmlrpc-client.lsp - XMLRPC
Basically we would follow Cormullion's suggestion to title-case namespace names except for generally known abbreviations (Internet protocols, known trademarks, etc.). The documentation (newlisp_manual.html, CodePatterns.html) mostly follows this convention already and changes would be made where this is not the case.
Most third party modules listed here: http://www.newlisp.org/modules/ also follow this convention already, and it seems to be generally accepted programming practice.
What do you think? What would be the schedule of introduction?
Ps: variables holding contexts would stay lower-case. This way both cannot be confused when reading unknown code:
... it would then be obvious that 'cx' is a variable holding a context, not a context itself.
This has been discussed earlier, but as it may break existing code I am interested to hear the community about this again and before changint it.
The following prefixes would be affected:
canvas.lsp - cv -> Cv
crypto.lsp - crypto -> Crypto
postscript.lsp - ps -> Ps
stat.lsp - stat -> Stat
sqlite3.lsp -> sql3 -> Sql3
unix.lsp -> unix -> Unix
zlib.lsp -> zlib -> Zlib
The following prefixes would stay as they are:
cgi.lsp - CGI
ftp.lsp - FTP
gmp.lsp - GMP
indix.lsp - INFIX (or should it be Infix ?)
mysql.lsp - MySQL
pop3.lsp - POP3
postgres.lsp - PgSQL
xmlrpc-client.lsp - XMLRPC
Basically we would follow Cormullion's suggestion to title-case namespace names except for generally known abbreviations (Internet protocols, known trademarks, etc.). The documentation (newlisp_manual.html, CodePatterns.html) mostly follows this convention already and changes would be made where this is not the case.
Most third party modules listed here: http://www.newlisp.org/modules/ also follow this convention already, and it seems to be generally accepted programming practice.
What do you think? What would be the schedule of introduction?
Ps: variables holding contexts would stay lower-case. This way both cannot be confused when reading unknown code:
Code: Select all
(new Class 'Bar)
(define (foo cx a b c)
(set 'cx:data (+ a b c))
)
(foo Bar 1 2 3)
Bar:data => 6