Skip to content

Kurt-PL/std-spec

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Kurt programming language

A low-level general-purpose programming language that keeps its promises.

Philosophy

Low-level programming has a trust problem.

A language promises defined behaviour, then takes it back the moment the optimiser finds the promise inconvenient. It offers constructs that look like its own but whose meaning is settled elsewhere, in a backend or a compiler pass the programmer never sees. When a toolchain's limitation forces a semantic compromise, the compromise gets written down as though it were chosen on purpose, and no one says otherwise.

Kurt does none of these things.

Kurt does not betray

A language that allows an operation, defines no result for it, then lets the compiler assume it never happened has broken its contract with the programmer. The programme does one thing on Monday and another on Tuesday, and both are called correct.

Kurt gives the implementation no licence to speculate. Where the specification defines behaviour, that behaviour holds. Where the result depends on something the specification cannot predict, the specification says so in writing, and the programmer has to acknowledge it before going on.

Kurt does not lie

Some languages carry constructs that look like part of the language and are not. They show up in source with the syntax of a function call or a type, but no specification the programmer can read governs what they mean. The meaning belongs to one compiler, and it can change without notice.

Kurt has two categories of constructs: those defined by the specification, and those defined by the programmer. There is no third category.

Kurt does not flee

A language is rarely built from nothing. It sits on tools it did not design: a backend, an intermediate representation, a code generator, each with its own semantics and its own constraints. The easy path is to let those show through. A limit the tool imposes becomes a limit of the language. A model the tool assumes becomes the model the language teaches. The tool was never bound by the language's specification, so it can change that meaning whenever it likes, and when it does, programmes already written come to mean something other than they did, with nothing in the specification having moved.

These borrowed limits are abdications rather than design decisions: a dependency's constraints spoken in the language's own voice, repeated in the documentation until no one remembers a decision was ever there to make. A language that lets a tool fix its meaning has not made that meaning simpler. It has given it away, and left the programmer answering to something the specification never names.

Kurt's specification is the sole definition of the language. A constraint exists because the specification defines it, not because an implementation artifact demands it. Where the specification delegates, it says so, and requires the implementation to document its choice.

Scope

This specification defines the syntax, semantics, and translation model of the Kurt programming language. It is intended for use by implementers and by programmers.

It specifies:

— the form and interpretation of programmes written in Kurt;

— the semantic rules governing their execution;

— the constraints imposed by a conforming implementation.

It does not specify:

— any library or trait definition;

— the mechanism by which source text is obtained;

— the mechanism by which the opaque code produced by translation is combined into an executable image;

— the mechanism by which a translated programme is invoked;

— the capacity limits of any data-processing system.

Document encoding

These documents are encoded as UTF-8 over the Universal Coded Character Set (ISO/IEC 10646), formatted as text/markdown; variant=GFM (IETF RFC 7763, RFC 7764).

Conformance

In this specification, shall is to be interpreted as a requirement on an implementation or on a programme; shall not as a prohibition. A conforming implementation shall accept and correctly translate any source unit whose syntax and semantics conform to this specification, and shall reject any source unit that violates a constraint described as a translation failure.

A conforming programme is a source unit that uses only the constructs defined in this specification and does not rely on implementation-defined behaviour.

Licence

This specification is licensed under the Creative Commons Attribution 4.0 International Public Licence (CC BY 4.0), subject to the terms of the Kurt Specification Public Licence Addendum 1.0. Where the Addendum and CC BY 4.0 conflict, the Addendum prevails.

See LICENCE and LICENCE.ADDENDUM for the full text.

About

The standard specification of the Kurt programming language.

Topics

Resources

License

Unknown, Unknown licenses found

Licenses found

Unknown
LICENCE
Unknown
LICENCE.ADDENDUM

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors