Jump to content

Category:Draco

From Rosetta Code
Revision as of 12:45, 30 January 2022 by Tigerofdarkness (talk | contribs) (Added references to Algol 68)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Language
Draco
This programming language may be used to instruct a computer to perform a task.
Execution method: Compiled (machine code)
Garbage collected: No
Parameter passing methods: By value
Type safety: Safe
Type strength: Strong
Type compatibility: Nominative
Type expression: Explicit
Type checking: Static
See Also:


Listed below are all of the tasks on Rosetta Code which have been solved using Draco.
Draco is an implementation of Draco. Other implementations of Draco.

Draco is an imperative programming language written in the mid-1980s by Chris Gray. The language was written to combine the strengths of (1980s-era) C and Pascal, while avoiding what the author saw as weaknesses. The syntax is strongly ALGOL 68 influenced.

Draco is meant to be suitable for systems programming, and thus includes such C features as bitwise operators, pointer manipulation, signed and unsigned types, and conditional compilation, while also including Pascal-style strict typing, typed constants, and Pascal-inspired syntax meant to avoid common C pitfalls. Draco also includes some improvements of its own, such as the ability to pass variable-length arrays to functions, and even operator overloading of a kind.

Draco is also meant to run efficiently on microcomputers of the 1980s. To this end, Draco will always do math and pass parameters using the smallest possible type. Draco includes the ability to define numeric types by bounding them explicitly at compile time. Unlike Pascal, this limit is not enforced at runtime, but the compiler will select the smallest integer size that fits the given range. It is also possible to declare procedures to be "nonrecursive", which means those procedures do not use a stack frame, but instead allocate all their local variables statically. This makes the generated machine code more efficient.

Draco is also the name of the compiler, also written by Chris Gray. A CP/M and Amiga version are available (both will run on an emulator on a modern system). The compiler is self-hosted, and comes with a linker, an editor, a set of standard libraries, documentation and example code. While the compiler was originally distributed as shareware, Chris Gray is now offering both versions, as well as the source code, as a free download on his website.

Resources

See Also

  • Action!: a somewhat similar, but less advanced language, which targets the 6502.
  • ALGOL 68: the language on which much of the syntax is based.
  • Cowgol: a more modern language also targeting small systems, which is under active development, and shares many of the same design goals as Draco.

Subcategories

This category has only the following subcategory.

Pages in category "Draco"

The following 134 pages are in this category, out of 134 total.

Cookies help us deliver our services. By using our services, you agree to our use of cookies.