We are saturating the name space for programming languages. These days I discovered the Odin Programming Language “”The Data-Oriented Language for Sane Software Development.” According to its FAQs there are some things we may learn for Eiffel.
Its guiding principles are
- Simplicity and readability
- Minimal: there ought to be one way to write something
- Striving for orthogonality
- Programs are about transforming data into other forms of data
- Code is about expressing algorithms—not the type system
- There is embedded knowledge and wisdom in older programming languages
- The entire language specification should be possible to be memorized by a mere mortal
Its featre are features (in no particular order):
- Full UTF-8 Support
- Custom allocators that are simple to use:
- Memory arenas/regions, pools, stacks, etc. which can be easily added
- Context system for allocations, logging, and thread data
- Built-in types and procedures that take advantage of the context system:
new(type)
, andmake
use the context’s allocator (unless explicitly given)- Dynamic arrays and hash maps (
[dynamic]int
andmap[string]int
)
- Array programming
a, b: [4]f32; c := a * b
i := a.x * b.y
v := swizzle(a, 1, 2, 0)
- Explicit procedure overloading
- Introspection on all types
- High control over memory layout
- Alignment
- Field offsets
- Endianness
- Data sizes
- Endian specific integer types (useful for specific data formats)
u32le
u64be
- Decent package system and file handling
- No bad preprocessor
- Type inference
x: int = 1
x := 1 // x is deduced to be an int
using
- making everything a namespace (similar to Pascal’s
with
but on steroids) - Ability to have subtype polymorphism
- making everything a namespace (similar to Pascal’s
- Multiple return values
- Clean, consistent, and fast to parse syntax
- No need for procedure prototypes
defer
statements- defer a statement until the end of scope (akin to D’s
scope(exit)
)
- defer a statement until the end of scope (akin to D’s
- Nested procedures and types
- Tagged unions and untagged unions
- Ranged
for
loops - Labelled branches
break label_name
break
by default inswitch
statements- Explicit
fallthrough
- Explicit
- “Raw” strings
x := `what "the" string?`
cstring
for legacy use- Parametric polymorphism (“generics”)
- Foreign system
- Compile time
when
statements - Bounds checking which is togglable at the statement level:
#no_bounds_check
#bounds_check
i128
andu128
support
And lots more!