golemcloud / golem

Golem is an open source durable computing platform that makes it easy to build and deploy highly reliable distributed systems.
https://learn.golem.cloud/
Apache License 2.0
213 stars 22 forks source link

Make Rib type driven #441

Closed afsalthaj closed 2 weeks ago

afsalthaj commented 4 months ago

Currently Rib is pretty much a dynamic language.

It is my much better to be able to import types or infact declare types (than inferring and parsing the Rib with an ambiguous context).

let x = Foo(“Jon”);

But it doesn’t know Foo was a variant. Or a way to specify I think Rib can easily support or import types and make it more like a type driven language.

Example:

variant Custom {
  Foo(u64)
  Bar(u64)
  Baz
} 

let worker_response: Custom = Foo(1);

match worker_response {
   Foo(int) => int
   _ => 0
}

Make sure to create a design documentation, and ensure this is the exact requirement with the team

afsalthaj commented 4 months ago

Let me know if this clearly worded @jdegoes @vigoo