no_bounds_check – Paolo Redaelli https://monodes.com/predaelli A civil engineer with a longlife fondness for Software Libero Fri, 16 May 2025 16:02:44 +0000 en-US hourly 1 https://wordpress.org/?v=6.7.2 91795679 Saturating the name-space https://monodes.com/predaelli/2025/05/16/saturating-the-name-space/ https://monodes.com/predaelli/2025/05/16/saturating-the-name-space/#respond Fri, 16 May 2025 16:02:40 +0000 https://monodes.com/predaelli/?p=13371 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), and make use the context’s allocator (unless explicitly given)
    • Dynamic arrays and hash maps ([dynamic]int and map[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
  • 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))
  • Nested procedures and types
  • Tagged unions and untagged unions
  • Ranged for loops
  • Labelled branches
    • break label_name
  • break by default in switch statements
    • Explicit fallthrough
  • “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 and u128 support

And lots more!

]]>
https://monodes.com/predaelli/2025/05/16/saturating-the-name-space/feed/ 0 13371