If you, like me, belong to the group of people who likes to have a large toolbox, then i bet you've been thinking this thought numerous times: "If only langauge X had this feature Y, that langauge Z have..." Real examples include

  1. "If only C++ had lambdas like Javascript."
  2. "If only C++ had modules like Python"
  3. "If only C++ had garbage collection like Java/C#"
  4. "If only C++ had list comprehensions like Python"
  5. "If only C++ had fixed types like Java"
  6. "If only C++ had modern syntax like Java/C#"
  7. "If only C++ had more predictable symbol lookup like every other langauge known to man."
  8. "If only Java had pointers like C++"
  9. "If only Java had multiple inheritance like C++"
  10. "If only Java had performance like C++"
  11. "If only C# had constness like C++"
  12. "If only C# had metraprogramming like C++"
  13. "If only C# had better access to memory like C++"
  14. "If only C# had memory footprint like C++"
  15. "If only java/C# had embeddability like C++"

When you already know exactly what tool to use for a given problem, it can be rather frustrating to discover it's missing from your toolbox in the given environment.

Proven concepts

For this reason, Cosmos attempts to gather proven language design concepts from its competition, while recognizing it is unnecessary to cover all bases.

While Cosmos does have a larger number of concepts to pick from, they have been weighed according to what benefits they give, versus how easy it would be to achieve similar functionality. Deciding what ideas to bring into a language, and which ideas to leave on the bench, is certainly one of the most significant challenges inthe design of Cosmos.

Shoot that foot

An important point to Cosmos, is that no feature is designed to prevent the user from doing certain things. Cosmos is made for skilled programmers, who are capable of deciding among various ways to solve a given problem. If you want to use "goto", it's probably because you find it to be the right tool for the particular problem. In fact, Cosmos give you even more dangerous tools to play with, when it's required.

Imagine a butcher with a dull knife, only to prevent him from cutting himself!

The tools are designed for basic safety though, just like a knife doesn't abruptly blow up in your face, the features of Cosmos has been designed to be relatively easy to reason about.

Page last modified on August 27, 2015