Developer productivity is a top design goal for Cone.

This does not mean that Cone will ever top the charts for how quickly a programmer can learn the language. Cone is too rich with features that are needed to facilitate performance, safety and code readability. Becoming an expert in properly using all these features is expected to take time and diligence.

Instead, Cone focuses on improving life-cycle agility for the knowedgeable, professional programmer. Since most of a programmer's time is spent on maintenance (often of someone else's code), the language design is prioritized around ensuring that Cone code is concise and expressive when read, and easy to refactor when improvements are required.

Reuse

Reusability is a huge lever for productivity. For example, generics allow you to create one piece of code logic, and then reuse it by varying the types. Similarly, the whole point of packaged libraries is to enable programmers to get work done more quickly by leveraging the reusable work of others. Naturally, Cone supports both.

Cone takes the productivity advantages of reuse and polymorphism even further:

Type Inference and Coercion

Cone supports bidirectional type inference, which reduces how often type annotations need to be specified. Generally speaking, type annotations are usually required on function signatures and data constructors. In other cases, especially variable declarations, type annotations are often optional, as they can either be inferred or have a known default.

As a part of type inference, the compiler is also able to detect when it is safe to automatically coerce a value of some type to its equivalent supertype value. This eliminates the need for the programmer to explicitly convert the values.

Syntactic Sugar

Significant effort has been invested into making Cone's grammar simple and clear. The lesser benefit is that code creation is faster and easier to remember. The greater benefit is that the resulting concise, readable code is easier to understand and improve, especially when one's eyes are not distracted by unnecessary, space-consuming boilerplate.

Here are some examples of helpful syntactic sugar:

Significant indentation

You may have noticed (from code examples) that Cone supports Python-like significant indentation, where a block begins with a colon, and subsequent indented lines are considered part of the block.

The primary reason for this choice is code readability. When we are not wasting whole lines to hold a single curly brace, more of the code logic is visible in the editor. It is easier to digest what code is doing when the bulk of the logic can be seen together without scrolling.

If you prefer curly braces (and statement-ending semicolons), go ahead and use them. Cone supports both styles.

Build Pipeline

As compilers go, the Cone compiler is pretty fast. Given how often programmers have to re-compile systems, this too contributes to developer productivity.