The Dio Programming Language

Dio is a statically typed compiled language. It focuses on being fast, memory efficient, safe and design for programmers who have years of experience. As 'simple' as it may be to write, it has many keywords and syntax to reduce common pattern. It uses LLVM to optimize and compile to native code.

A Simple Example

struct plain_old_data { int a, b, c, d }
main() int { //<-- return type is after function and optional
literal = 5
decl data = plain_old_data.{a=literal, d=9} //declares modifies members
PrintData(data.{b=literal*2, c=30}) //The .{var=newValue} syntax is not just for declarations
ChangeData(data mut) //mut is required so it's clear the data may be modified

WriteLine("File example")
file_contents = ReadFileAsArray("example.dio") ## {
puts("Fail to read file")
return 0
return 0
ChangeData(plain_old_data data /*To modify we must include*/ mut) { data.a = 30 }
PrintData(plain_old_data data) { WriteLine(itoa(data.a+data.b+data.c+data.d).UTF8) }