219,281pages on
this wiki
Add New Page
Discuss this page0 Share

Parenscript is a small lispy language that can be compiled to Javascript. It is a more flexible than Javascript syntactically because the language can be extended using Lisp-style macros.

From the parenscript web site: "It also comes with an embedded CSS representation in Lisp. This simplifies the development of web applications in Lisp by allowing the Lisp programmer to write all the documents in Lisp syntax. This way, HTML pages, CSS files and JavaScript code can be generated with the full power of Lisp."

Outstanding issues in development using Parenscript

Parenscript is great, but it's not perfect. Parenscript eliminates many of the problems in writing Javascript, but it inherits some too.

Modules of code

There is still no clear solution for packaging code into modules in Javascript. This roughtly breaks down into two classes of problems: namespace problems and packaging problems.

Namespace issues

Namespace problems are those related to name conflicts in the Javascript environment. Currently developers solve this by introducing simple objects that serve as Java-esque prefixes: dojo.widgets.bloated, Ajax.Request, etc. Using prefixes is a good idea, but importing a package's "symbols" is sort of awkward. For example, a way to import everying from the dojo package is this:

for (var dojoSym in dojo)
   window[dojoSym] = dojo[dojoSym];

However, once those symbols are imported, they are imported into the global scope where they may conflict.

Does with(dojo) solve this problem at all?

This is my Number 1 outstanding issue in the Parenscript world. -red 10:08, 16 January 2007 (UTC)

Packaging issues

Right now there is no consistent packaging strategy for Javascript code. In most cases, developers wishing to use the latest and greatest will download a project, add it to their own source tree, and then follow special instructions about how to actually include the scripts in their web sites. This works O.K. most of the time, but it is indeed not the smartest system.

Parenscript should probably take advantage of Lisp's Another System Definition Facility (ASDF) to define packages. I (red) have not worked out the details of how to define Parenscript systems yet. It should be easy to (1) install somebody else's parenscript package (via an asdf:load-op) and (2) include individual Parenscript components in web pages.

Parenscript systems will include Parenscript code along with Lisp code, since Parenscript includes a lisp macro system.

Parenscript-related projects

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

Also on Fandom

Random wikia