Curl Language

Curl Language was developed originally MIT to provide a more consistent Rich Internet Application platform - without the discontinuities of Html Dom Js Css + ajax + server-side scripting. Today, Curl is developed by Curl Inc. (www.curl.com ), which provides a proprietary implementation and developer tools (payment is on developer side; the client-side runtime is free). The basic language is simply embedded in text by use of curly-brace delimiters {}, thus the name 'curl'. Default primitive display elements are inspired by HTML and Tcl Tk, but also include data-grids and drill-down. Curl supports defining or extending OO classes, including the default ones.

Curl uses client-side Just In Time Compilation to native code, which gives enough performance for rich 2D, 3D, sound, visualizing and manipulation of large data sets - enough to make it suitable basis for a gaming client or browser or IDE. (Indeed, Curl's main IDE is implemented in Curl.) Security is achieved through a combination of Strong Typing and sandboxing. Typing is not static; similar to Ruby or Smalltalk, types are objects that can be patched or mutated at runtime.

A few features supported by the Curl language design but not by most competing technologies:

Minimal Server/Client Discontinuity: when both client and server are developed in Curl, functionality can adjust easily - even dynamically - between client and server in order to meet performance requirements.

"Occasionally Connected Computing": storage is treated as remote, but saves and loads will use a local file while offline then synchronize automatically with the remote service once connectivity is reestablished. This default allows simple stateful apps to be written ignorant of connectivity issues; those that must be more aware can be made so explicitly.

Curl's primary Language Design goal was a 'gentle slope' for developers. This includes both minimizing discontinuity between client-side and server-side, and providing a 'gentle slope' between generating simple formatted text and Rich Internet Applications - i.e. to avoid huge leaps in the required language skills, translation challenges, or knowledge of security and optimization issues for client-side vs. server-side elements.


The Curl web programming environment is a proprietary Rich Client (or sometimes called a "fit" client) designed to offload most processing from the server. The client consists of a Just In Time Compiler, a multimedia engine, a UI framework, and XML parsers and networking libraries for communication. It receives source code via HTTP and compiles and executes it on-the-fly, using normal sandboxing techniques for security. Preprocessed Curl source code (Pcurl files) is quite compact (see Curl Language Examples), leading to very quick downloads and can be either selectively cached or dynamically loaded.

Some of the strengths of Curl come from its having a combination of multiple inheritance, factory methods, macros and having anonymous functions that are first-class objects as well as the runtime JIT compiler compiling Curl to native code.

Curl code is also homoiconic: Curl can be both the code and the data format.

Curl is first and foremost a web-content language intended to replace or complement both HTML+Java Script and XHTML.

Curl has had async processing since at least 2001 (long before AJAX was a buzzword).

Curl is now at version 7.0 and since 6.0 has had a separation of style from content as well as interfaces to Java Script and JSON. Recently Curl add support for SQLite including as a in-memory db.

Curl's permission for abstract classes to implement some methods and use of multiple inheritance constitutes a Mixin strategy roughly equivalent to Traits (but as of 2009/07 Curl still lacks a Refactoring Browser or even full class browsers.

One Curl asset is the "live" code contained in the Curl documentation which is itself Curl code. Using the {example} macro, the reader can edit code, execute code, save code and reset code.

After years in Smalltalk environments, a developer working in Curl has rated it a close "second best" due to its able debugger and graphical inspection tools.

Curl offers two programming styles: declarative and procedural (which can be quite freely mixed and, with macros, modified).

Curl permits prototyping with no types other than the "any" type and then progressively adding constraints in the form of compiler directives to achieve production or industrial-strength code.

Since 2007, Curl has been releasing add-on packages as opensource (Curl Inc. was an MIT spinoff and is now owned by Sumisho).

As of 2009 Curl is primarily used in Japan but has global use in governments and large corporations due to the widespread use of the GRC suite of Paisley Consulting (acquired in Dec 2008 by Thomson Reuters).

As is the case with Java Script, Curl has spawned such commercial add-ins as custom spreadsheets.

Although www.curl.com has no curl version of its web site, but logiquewerks.com (which used to focus only on Smalltalk + PROLOG) now has Curl pages that run most of the available Curl demos: installation of the Curl runtime is required to view those Curl pages.

Prior to Curl 7.0, processes (sub-applets) and Curl scripts (xcurl files) went largely undocumented. Files with the extension "dcurl" are now used to install Curl applets as desktop applications. Curl 7.0 includes splash screens built with Curl's IPC (inter-process communication) API.

Curl packages now offer digital signing as an option.

See www.curl.com (info) developers.curl.com (developers) or www.curlap.com (in Japanese).


Question: Why should one use this proprietary language over other established proprietary GUI languages such as Adobe's Flex/Action Script?

The continuity issue would be the biggest advantage. With Adobe's Flex/Action Script, you'll do a lot of rework tweaking what executes client-side versus what executes server-side. (And it will involve rework, because you'll be using different languages and different projects for server-side vs. client-side.) You'll spend time learning several different languages, and you'll write extra code to interface them. By designing away a few Discontinuity Spikes, plus providing some good default libraries, Curl app code tends to be smaller than Ajax or Flex. (OTOH, the Curl RTE plugin is bigger.) By supporting homoiconic code, extensible types, and sandboxing and JIT, Curl apps can be extended with minimal changes to existing code.

Curl Inc. would also emphasize their offline support, which comes from a good choice of default library design than from the Curl Language proper. But you can peruse www.curl.com if you want to know what Curl Inc. thinks.

For rich multi-media, you should currently favor Adobe's product. Curl is targeted more towards Business Applications (business-to-employee and business-to-business) involving large dataset processing and visualization (reports, graphs, dashboards, heatmaps, datagrids, etc.). There is no reason video couldn't be supported, but it hasn't received much demand from the businesses using Curl.

I find Curl interesting because it is, in fact, a language with a consistent Language Design behind it, as opposed to a hodge-podge of frameworks and inconsistent mini-languages like Adobe. There is a lot more to learn from Curl than from most of its competition.

Personally, I wouldn't use either of them. Curl's developer license for shared apps has a $12k price tag (though it's free for personal use). I'm also more interested in Interactive Documents than in Rich Internet Applications, and sandbox-based security is not sufficiently expressive for many of the design patterns that I'd like to support (cf. Object Capability Model, Power Box). But, even if my goal is to develop a competing platform aligned with my own interests, I should learn my competition and be inspired by their better ideas.


See original on c2.com