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), andmakeuse the context’s allocator (unless explicitly given)- Dynamic arrays and hash maps (
[dynamic]intandmap[string]int)
- Array programming
a, b: [4]f32; c := a * bi := a.x * b.yv := 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)
u32leu64be
- Decent package system and file handling
- No bad preprocessor
- Type inference
x: int = 1x := 1 // x is deduced to be an int
using- making everything a namespace (similar to Pascal’s
withbut 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
deferstatements- 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
forloops - Labelled branches
break label_name
breakby default inswitchstatements- Explicit
fallthrough
- Explicit
- “Raw” strings
x := `what "the" string?`
cstringfor legacy use- Parametric polymorphism (“generics”)
- Foreign system
- Compile time
whenstatements - Bounds checking which is togglable at the statement level:
#no_bounds_check#bounds_check
i128andu128support
And lots more!