Cone is a fast, fit, friendly, and safe systems programming language:
- Fast. Systems programming languages (like C) produce the fastest programs. Cone is no exception.
- Fit. Cone programs pack a lot of power for their size, both as source files and as delivered executables.
- Friendly. The language design makes programs easy to read and change. The tools accelerate your time-to-market.
- Safe. Built-in mechanisms ensure programs behave well, even when dealing with raw memory or concurrency.
The 3D web is the "killer app" focus for Cone. As a result, it must handle these programming language roles well:
- simulation modelling, enabling specification of complex systems that can be simulated via real-time high-quality rendering, timely interactions between people and parts, and rule-driven changes of state.
- event-driven control flow, so worlds stay calm and responsive while juggling a blur of competing workload demands.
- object- and actor-oriented modularity, as snapping together flexibly typed, modular parts, each with its own content and behavior, is ideally suited to the object-oriented paradigm.
- static typing, to accelerate performance and ensure compile-time memory, concurrence and type safety.
In pursuit of its core focus, Cone supports:
- "Do-it-your-way" memory management
- Flexible typing & code reuse
- Concise, readable code
- Memory, thread & type safety
- Lean, native runtime
It turns out that Cone's ability to handle the punishing demands required for realtime, realistic 3D means it also has the fitness and ease-of-use to handle other, less-demanding program requirements.
What's Special about Cone?
There are many programming languages to choose from. What makes Cone worth taking the time to get to know it better? Let's start with a few distinctive features you won't find in any comparable language:
- References. You've never seen references safely carry this much power and flexibility. With them, a program can easily exploit the broadest range of multiple memory management strategies (from fast RAII to flexible GC) in a way that optimizes performance and productivity. Furthermore, references support the fluid transition of any value's access permissions as it flows through a program, making possible faster approaches to safe, lockless concurrency.
- Extensible Pattern Matching. You can build your own pattern matchers which not only determine if there is a successful match, but can also extract values as part of the process.
- Structural Interfaces. Like other languages, Cone supports nominal "interfaces" in the form of traits which a struct must declare that it implements. Unusually, Cone also supports structural interfaces, which allow types to be more flexibly applied to generic program logic even in the absence of a declared implementation.
- This blocks. This simple bit of syntactic sugar goes a long way towards improving code clarity, particularly when working with complex content (e.g., a 3D world). This lexical structure makes it easier to see what content the code is working on and what it is doing with that content.
Of course, Cone also supports features expected of a modern programming language:
- Variant (sum) types
- Closures and anonymous functions
- Generics and metaprogramming
- Tuples, for parallel assignment and multiple return values
- Slices and built-in iteration
- Operator overloading and computable properties
There are several approaches one can take to learn more about Cone:
- Cone Playground. Offers helpful short sample programs which can be modified and run in the browser.
- Showcase. A few selected examples that demonstrate Cone's visual style and idioms.
- Language Reference. Progressive and comprehensive descriptions (with examples) of Cone's features.
- Syntax. Formal grammar using railroad diagrams and EBNF notation.