Language Ideas

This is meant to be more of a brainstorming thing than a specification.

General Spirit

Syntax

Type System

OOP

Modules

“Data-driven thinking” / Traits

In C you often end up with giant structs which looks like

   struct MegaStruct {
   a bunch of properties used by all
   ...
   a bunch of properties only used by code A
   ...
   a bunch of properties only used by code B
   ...
   a bunch of properties only used by code C

This is bad for modularity, but there isn’t a nice way (in C) to avoid it. What you really want is a way to specify these things separately, together with the code that manipulates them; in fact keeping them separately in memory might be a good idea too (improves cache locality). One approach is to define a bunch of “traits” like

   trait MegaStructPartA {
          only those properties used by A
   }

An object is then only an accumulation of certain traits.

Testing

Crazy Ideas