Lädt...

🔧 GearLang - A Systems Programming Language For Flexibility, Control, and Interoperability


Nachrichtenbereich: 🔧 Programmierung
🔗 Quelle: dev.to

Systems programming can be difficult and verbose. Just take a single function from my current project:

virtual auto iterate_parsers(
    std::span<std::shared_ptr<token::Base>>& list,
    std::vector<std::function<Node*(std::weak_ptr<Node>)>>& types,
    std::weak_ptr<Node>& parent
) -> std::optional<std::shared_ptr<Node>> const;

I know it's a lot, right?

What if we wanted something cleaner, but more importantly, something faster and less error prone? Well, I introduce you to GearLang, a proposed programming language with the benefits of Zig's comptime, Rust's enums, C++'s classes, and the full use of C/C++ ecosystems!

Clean Syntax

GearLang prioritizes minimal syntax to increase visibility, where we need it most!

fn main {
  greet "bob";
  exit 0;
}

fn greet name:string => f"Hello, {name}!";

Comptime calculations and checks

One of the big things about Zig is the comptime, but I feel like we can do a little more with it. Introducing Comptime checks! A way to assert valid code each time the program runs!

fn main {
  let num1, num2 = 4, 6;

  comptime assert num1 > num2; // "Comptime Test Error! Tried num1 (4) > num2 (6)"

  exit 0;
}

Integrated Tests

However, lots of tests can make the build process take waaaaaaay too long. To fix that, I propose seperate integrated test functions, to ensure that everything is according to plan.

fn main {
  let num1, num2 = 4, 6;

  test my_test num1, num2;
}

test my_test num1:i32, num2:i32 {
  assert num1 < num2;
}

Interoperability

What's the point of implementing a new language if it takes too long and is too hard to implement it into your program? I suggest interoperability between C/C++ of course, and maybe soon, Rust!

!include {
  C::printf,
  C++::std::{
    allocator,
    vector<T, A=allocator>
  },
  Rust::std::{
    Result<T,E>
  },
}

Conclusion

With all of these added together, it is a really big ask for one person to make this language. If you see the same potential as I do, I could really appreciate any help I could get! You can view the GitHub repo here

...

🔧 GearLang - A Systems Programming Language For Flexibility, Control, and Interoperability


📈 95.39 Punkte
🔧 Programmierung

🔧 Flexibility of plang programming language


📈 29.47 Punkte
🔧 Programmierung

🔧 Design Systems, Design Tokens and the eternal battle between efficiency and flexibility


📈 23.79 Punkte
🔧 Programmierung

🔧 Did you know? How .NET Achieving Language Interoperability (C# + VB.NET = Same Application)


📈 22.68 Punkte
🔧 Programmierung

🔧 Designing for Flexibility: Reducing Cloud Lock-In in Legacy Systems


📈 21.53 Punkte
🔧 Programmierung

🔧 Axum in Rus: Flexibility, CORS Control, and Tower Power


📈 21.34 Punkte
🔧 Programmierung

🔧 Flask vs Django: The Epic Showdown Between Flexibility and Control!


📈 21.34 Punkte
🔧 Programmierung

📰 Strike Graph VerifyAI gives businesses flexibility and control for audits


📈 21.34 Punkte
📰 IT Security Nachrichten

📰 Secure Your Hybrid Cloud Environment With Visibility, Control and Flexibility


📈 21.34 Punkte
📰 IT Security Nachrichten

🔧 SQL vs Programming Languages: Can SQL be Considered a Programming Language?


📈 20.96 Punkte
🔧 Programmierung

🔧 Learn Programming: What Programming Language Should I Learn First?


📈 20.96 Punkte
🔧 Programmierung

🔧 Hybrid IT – Flexibility Meets Control


📈 20.21 Punkte
🔧 Programmierung

🔧 The Programming Language Showdown: Why Passion for Solutions Matters More Than Language Debates


📈 19.99 Punkte
🔧 Programmierung

🔧 The Next Big Language: How to Choose the Perfect Programming Language to Learn.


📈 19.99 Punkte
🔧 Programmierung

🔧 Presenting Assistant Language. A programming language created with GPT3


📈 19.99 Punkte
🔧 Programmierung

🐧 AWK As A Major Systems Programming Language — Revisited


📈 19.37 Punkte
🐧 Linux Tipps

📰 We need a safer systems programming language


📈 19.37 Punkte
📰 IT Security Nachrichten

📰 We need a safer systems programming language


📈 19.37 Punkte
📰 IT Security Nachrichten

📰 We Need a Safer Systems Programming Language


📈 19.37 Punkte
📰 IT Security Nachrichten

🕵️ Infecting Systems by Typosquatting Programming Language Libraries


📈 19.37 Punkte
🕵️ Reverse Engineering

🕵️ Infecting Systems by Typosquatting Programming Language Libraries


📈 19.37 Punkte
🕵️ Reverse Engineering