Curl (programming language)
From Wikipedia, the free encyclopedia
| Paradigm | multi-paradigm: object-oriented, markup |
|---|---|
| Appeared in | 1998 |
| Designed by | Steve Ward, MIT |
| Developer | Curl, Inc. & Sumisho Computer Systems Corp. |
| Stable release | 7.0.0 |
| Typing discipline | strong |
| Influenced by | HTML, JavaScript |
| OS | Cross-platform: Windows, Linux, Macintosh |
| Website | http://www.curl.com/ |
Curl is a reflective object-oriented programming language designed for interactive web applications that aims to provide smooth learning curve from simple formatting till programming. This means, it does not require to change the language or development platform for embedding more complex objects into document. The authors or the language claim that changing language and development tools to produce more complex content confronts Web authors with annoying -- and potentially crippling -- semantic and performance discontinuities. To add an animation or interactive simulation to the Web page normally requires to escape from the simple markup language to an unrelated programming language within which the new functionality may be implemented. Such discontinuities partition the content creators into nearly disjoint sets of authors versus programmers and interferes interaction between separately implemented parts. Curl avoids these problems by using a consistent syntax and semantics for the expression of Web content at levels ranging from simple formatted text up till the object-oriented programming.
Curl combines text markup (as in HTML), scripting (as in JavaScript), and heavy-duty computing (as in Java, C#, or C++) within one unified framework. It is used in a range of internal enterprise, B2B, and B2C applications.
Curl is a markup language like HTML—that is, plain text is shown as text; at the same time, Curl includes an object-oriented programming language that supports multiple inheritance. Curl applications are not required to observe the separation of information, style, and behavior that HTML, CSS, and JavaScript have imposed, although that style of programming can be used in Curl if desired.
While the Curl language can be used as an HTML replacement for presenting formatted text, its capabilities range all the way to those of a compiled, strongly typed, object-oriented system programming language.[1] Both the authoring (HTML-level) and programming constructs of Curl can be extended in user code. The language is designed so Curl applications can be compiled to native code of the client machine by a just-in-time compiler and run at high speed.
Curl applets are viewed using the Curl RTE, a runtime environment with a plugin for web browsers. Currently, it is supported on Microsoft Windows, Linux, and Macintosh.
Curl has had a feature of "detached applets" for several years, which is a web deployed applet which run on the user's desktop independent of a browser window much as in Silverlight 3 and Adobe AIR. Curl applets can also be written so that they will run off-line when disconnected from the network (occasionally-connected computing). In fact, the Curl IDE is an application written in Curl.
Contents |
[edit] Syntax
A simple Curl applet for HelloWorld might be
{Curl 5.0, 6.0, 7.0 applet}
{text
color = "blue",
font-size = 16pt,
Hello World}
This code will run if the user has at least one of the Curl versions 5.0, 6.0, or 7.0 installed.
Curl provides both macros and text-procedures in addition to anonymous procedures and named methods. An alternative using the text-procedure paragraph would be:
{paragraph
paragraph-left-indent=0.5in,
{text color = "red", font-size = 12pt,
Hello}
{text color = "green", font-size = 12pt,
World}}
Recently this style of layout has been adopted by 'builders' in the Groovy language for the JVM, but is also familiar to users of CSS or Tcl/Tk. Most features for RIA now sought through combinations of JavaScript libraries + HTML + CSS are already found within the Curl language including features usually associated with Prototype + Scriptaculous such as accordion panes.
Curl sets callbacks in the manner also adopted by Groovy:
{CommandButton width=100pt,
height = 50pt,
label = {center {bold Invokes an event handler when clicked}},
control-color = "orange",
|| Attach the following event handler to this CommandButton
{on Action do
{popup-message
title = "Your Message",
"This is a user message dialog."
}
}}
Curl comments use the vertical bar in several variations. The simplest is as follows:
{text A comment can be on a line by itself,
|| A comment on a line by itself
or it can be at the end || A comment on the same line as code
of a line.}
[edit] Marketing
Curl, Inc. is headquartered in Cambridge, Massachusetts and is a wholly owned a subsidiary of Sumisho Computer Systems Corp.. The largest number of over 400 commercial Curl customers are currently in Japan and other Asian countries, but Curl is also available in the Western world.
Curl is free to use for non-commercial and some commercial uses (see licensing). A Pro version is available which provides additional enterprise class capabilities.
[edit] See also
- Homoiconicity: Curl is both a programming language and a data format
[edit] References
[edit] External links
| Wikibooks has a book on the topic of |
- MIT Curl Project, the results of the Curl research project at MIT's Laboratory for Computer Science.
- Curl, Inc. and Curl International Corp. develop and distribute a suite of commercial products which are based on the results of the MIT research. Owned by Sumisho Computer Systems Corp. a majority-owned unit of Sumitomo Corp.
- InfoWorld review of Curl 6.0 by Martin Heller. InfoWorld awarded Curl its 2008 Technology of the Year award in the RIA category.