For faster navigation, this Iframe is preloading the Wikiwand page for Curl (programming language).

Curl (programming language)

This article has multiple issues. Please help improve it or discuss these issues on the talk page. (Learn how and when to remove these template messages) This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.Find sources: "Curl" programming language – news · newspapers · books · scholar · JSTOR (December 2014) (Learn how and when to remove this message) This article includes a list of general references, but it lacks sufficient corresponding inline citations. Please help to improve this article by introducing more precise citations. (June 2015) (Learn how and when to remove this message) (Learn how and when to remove this message)
Curl
Paradigmsmulti-paradigm: object-oriented, markup
Designed bySteve Ward, MIT
DeveloperCurl, Inc., Sumisho Computer Systems Corp., SCSK Corporation
First appeared1998; 26 years ago (1998)
Stable release
8.0.13 / 6 September 2022; 22 months ago (2022-09-06)
Typing disciplinestrong
OSWindows
Licenseproprietary
Websitewww.curl.com
Dialects
none
Influenced by
HTML, JavaScript, Lisp

Curl is a reflective object-oriented programming language for interactive web applications, whose goal is to provide a smoother transition between content formatting and computer programming. It makes it possible to embed complex objects in simple documents without needing to switch between programming languages or development platforms. The Curl implementation initially consisted of an interpreter only; a compiler was added later.

Curl combines text markup (as in HyperText Markup Language (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, business-to-business (B2B), and business-to-consumer (B2C) applications.

Curl programs may be compiled into Curl applets, that are viewed using the Curl RTE, a runtime environment with a plugin for web browsers. Currently, it is supported on Microsoft Windows. Linux, and macOS was dropped on March 25, 2019 (starting with version 8.0.10).[1] Curl supports "detached applets", which is a web deployed applet which runs on the user's desktop independent of a browser window much as in Microsoft Silverlight 3 and Adobe AIR.

Architecture

[edit]

The Curl language attempts to address a long-standing problem: the different building blocks that make up any modern web document most often require wildly different methods of implementation: different languages, different tools, different frameworks, often completely different teams. The final, and often most difficult, hurdle has been getting all of these blocks to communicate with each other in a consistent manner. Curl attempts to side-step these problems by providing a consistent syntactic and semantic interface at all levels of web content creation: from simple HTML to complex object-oriented programming.

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, Cascading Style Sheets (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 abilities range all the way to those of a compiled, strongly typed, object-oriented system programming language.[2] 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 can also be written so that they can run off-line when disconnected from a network (occasionally connected computing). The Curl IDE is an application written in Curl.

Syntax

[edit]

A simple Curl applet for a "Hello, World!" program might be:

 {Curl 7.0, 8.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 7.0 or 8.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 Java virtual machine (JVM), but is also familiar to users of CSS or Tcl/Tk. Most features for web applications now implemented through combinations of JavaScript libraries + HTML + CSS are already found within the Curl language, including features usually associated with Prototype + script.aculo.us 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.}

As lightweight markup

[edit]

Because Curl provides for both user-defined text procedures and style sheets, it can be used readily as domain-specific lightweight markup. A major advantage over plain text HTML markup is that the text encoding can be set to UTF-8, and text entered in a Unicode-enabled text editor with no escaping of characters (like JavaScript, Curl is Unicode friendly). A poetry example is:

 {poem || wraps entire poem
    {stanza  || first verse here in any language
    }
    {stanza  || another verse here in any language
    }
 }

which can initially be implemented by defining the poem and stanza markup as paragraph text formats. Stanza could be further refined to include a hidden navigation anchor for page navigation using the Curl {destination} which is itself a text procedure.

The same markup can be used for different results, as one can style text to be visible in one context and invisible in another. Curl also permits top-level file inclusion so that a source text in markup can be included in different parent files. In education, for example, one could create a source file of test questions, and include it in both a student and a teacher version of the text.

See also

[edit]

References

[edit]
  1. ^ "Changes to Supported Operating Systems of Curl RTE Products". SCSK Corporation. Archived from the original on 2019-05-13. Retrieved 2020-04-01.
  2. ^ M. Hostetter; D. Kranz; C. Seed; C. Terman; S. Ward. "Curl: A Gentle Slope Language for the Web". MIT Laboratory for Computer Science. Archived from the original on 2008-12-24. Retrieved 2005-12-20.
[edit]
{{bottomLinkPreText}} {{bottomLinkText}}
Curl (programming language)
Listen to this article

This browser is not supported by Wikiwand :(
Wikiwand requires a browser with modern capabilities in order to provide you with the best reading experience.
Please download and use one of the following browsers:

This article was just edited, click to reload
This article has been deleted on Wikipedia (Why?)

Back to homepage

Please click Add in the dialog above
Please click Allow in the top-left corner,
then click Install Now in the dialog
Please click Open in the download dialog,
then click Install
Please click the "Downloads" icon in the Safari toolbar, open the first download in the list,
then click Install
{{::$root.activation.text}}

Install Wikiwand

Install on Chrome Install on Firefox
Don't forget to rate us

Tell your friends about Wikiwand!

Gmail Facebook Twitter Link

Enjoying Wikiwand?

Tell your friends and spread the love:
Share on Gmail Share on Facebook Share on Twitter Share on Buffer

Our magic isn't perfect

You can help our automatic cover photo selection by reporting an unsuitable photo.

This photo is visually disturbing This photo is not a good choice

Thank you for helping!


Your input will affect cover photo selection, along with input from other users.

X

Get ready for Wikiwand 2.0 🎉! the new version arrives on September 1st! Don't want to wait?