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
- "If only C++ had modules like Python"
- "If only C++ had garbage collection like Java/C#"
- "If only C++ had list comprehensions like Python"
- "If only C++ had fixed types like Java"
- "If only C++ had modern syntax like Java/C#"
- "If only C++ had more predictable symbol lookup like every other langauge known to man."
- "If only Java had pointers like C++"
- "If only Java had multiple inheritance like C++"
- "If only Java had performance like C++"
- "If only C# had constness like C++"
- "If only C# had metraprogramming like C++"
- "If only C# had better access to memory like C++"
- "If only C# had memory footprint like C++"
- "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.
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.