Curl is a
reflective object-oriented programming language
A programming language is a system of notation for writing computer programs.
Programming languages are described in terms of their Syntax (programming languages), syntax (form) and semantics (computer science), semantics (meaning), usually def ...
for interactive
web application
A web application (or web app) is application software that is created with web technologies and runs via a web browser. Web applications emerged during the late 1990s and allowed for the server to dynamically build a response to the request, ...
s, whose goal is to provide a smoother transition between
content formatting and
computer programming
Computer programming or coding is the composition of sequences of instructions, called computer program, programs, that computers can follow to perform tasks. It involves designing and implementing algorithms, step-by-step specifications of proc ...
. 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
In computing, a compiler is a computer program that Translator (computing), translates computer code written in one programming language (the ''source'' language) into another language (the ''target'' language). The name "compiler" is primaril ...
was added later.
Curl combines text
markup (as in HyperText Markup Language (
HTML
Hypertext Markup Language (HTML) is the standard markup language for documents designed to be displayed in a web browser. It defines the content and structure of web content. It is often assisted by technologies such as Cascading Style Sheets ( ...
)), scripting (as in
JavaScript
JavaScript (), often abbreviated as JS, is a programming language and core technology of the World Wide Web, alongside HTML and CSS. Ninety-nine percent of websites use JavaScript on the client side for webpage behavior.
Web browsers have ...
), and heavy-duty computing (as in
Java
Java is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea (a part of Pacific Ocean) to the north. With a population of 156.9 million people (including Madura) in mid 2024, proje ...
,
C#, or
C++) within one unified framework. It is used in a range of internal enterprise,
business-to-business (B2B), and
business-to-consumer
Direct-to-consumer (DTC or D2C) or business-to-consumer (B2C) is the business model of selling products directly to customers and thereby bypassing any third-party retailers, wholesalers, or middlemen. Direct-to-consumer sales are usually transa ...
(B2C) applications.
Curl programs may be compiled into Curl applets, that are viewed using the Curl RTE, a
runtime environment
In computer programming, a runtime system or runtime environment is a sub-system that exists in the computer where a program is created, as well as in the computers where the program is intended to be run. The name comes from the compile time ...
with a
plugin for
web browser
A web browser, often shortened to browser, is an application for accessing websites. When a user requests a web page from a particular website, the browser retrieves its files from a web server and then displays the page on the user's scr ...
s. Currently, it is supported on
Microsoft Windows
Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
.
Linux
Linux ( ) is a family of open source Unix-like operating systems based on the Linux kernel, an kernel (operating system), operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically package manager, pac ...
, and
macOS
macOS, previously OS X and originally Mac OS X, is a Unix, Unix-based operating system developed and marketed by Apple Inc., Apple since 2001. It is the current operating system for Apple's Mac (computer), Mac computers. With ...
was dropped on March 25, 2019 (starting with version 8.0.10). Curl support
"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
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
Object-oriented programming (OOP) is a programming paradigm based on the concept of '' objects''. Objects can contain data (called fields, attributes or properties) and have actions they can perform (called procedures or methods and impl ...
.
Curl is a
markup language
A markup language is a Encoding, text-encoding system which specifies the structure and formatting of a document and potentially the relationships among its parts. Markup can control the display of a document or enrich its content to facilitate au ...
like HTML—that is,
plain text
In computing, plain text is a loose term for data (e.g. file contents) that represent only characters of readable material but not its graphical representation nor other objects ( floating-point numbers, images, etc.). It may also include a lim ...
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.
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. Th
is an application written in Curl.
Syntax
A simple Curl applet for a
"Hello, World!" program might be:
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:
Recently this style of layout has been adopted by "builders" in the
Groovy
''Groovy'' (or, less commonly, ''groovie'' or ''groovey'') is a slang colloquialism popular during the 1960s and 1970s. It is roughly synonymous with words such as "excellent", "fashionable", or "amazing", depending on context.
History
The word ...
language for the
Java virtual machine
A Java virtual machine (JVM) is a virtual machine that enables a computer to run Java programs as well as programs written in other languages that are also compiled to Java bytecode. The JVM is detailed by a specification that formally descr ...
(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
A prototype is an early sample, model, or release of a product built to test a concept or process. It is a term used in a variety of contexts, including semantics, design, electronics, and Software prototyping, software programming. A prototype ...
+
script.aculo.us such as accordion panes.
Curl sets callbacks in the manner also adopted by Groovy:
Curl comments use the vertical bar in several variations. The simplest is as follows:
As lightweight markup
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
UTF-8 is a character encoding standard used for electronic communication. Defined by the Unicode Standard, the name is derived from ''Unicode Transformation Format 8-bit''. Almost every webpage is transmitted as UTF-8.
UTF-8 supports all 1,112,0 ...
, and text entered in a
Unicode
Unicode or ''The Unicode Standard'' or TUS is a character encoding standard maintained by the Unicode Consortium designed to support the use of text in all of the world's writing systems that can be digitized. Version 16.0 defines 154,998 Char ...
-enabled
text editor with no
escaping of characters (like JavaScript, Curl is Unicode friendly). A
poetry
Poetry (from the Greek language, Greek word ''poiesis'', "making") is a form of literature, literary art that uses aesthetics, aesthetic and often rhythmic qualities of language to evoke meaning (linguistics), meanings in addition to, or in ...
example is:
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 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
*
Homoiconicity
In computer programming, homoiconicity (from the Greek words ''homo-'' meaning "the same" and ''icon'' meaning "representation") is an informal property of some programming languages. A language is homoiconic if a program written in it can be mani ...
: Curl is both a programming language and a data format
References
External links
MIT Curl Project the results of the Curl research project at
Massachusetts Institute of Technology
The Massachusetts Institute of Technology (MIT) is a Private university, private research university in Cambridge, Massachusetts, United States. Established in 1861, MIT has played a significant role in the development of many areas of moder ...
's (MIT) Laboratory for Computer Science.
Curl, Inc.an
Curl International Corp.develop and distribute a suite of commercial products which are based on the results of the MIT research. Owned b
a majority-owned unit o
Sumitomo Corp.by Martin Heller.
InfoWorld
''InfoWorld'' (''IW'') is an American information technology media business. Founded in 1978, it began as a monthly magazine. In 2007, it transitioned to a Web-only publication. Its parent company is International Data Group, and its sister pu ...
awarded Curl its 2008 Technology of the Year award in the
Rich Internet Application category.
{{Authority control
High-level programming languages
Declarative programming languages
Functional languages
Lightweight markup languages
Markup languages
Rich web application frameworks
Homoiconic programming languages
Proprietary software