Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
wg-allocators
Home of the Allocators working group: Paving a path for a standard set of allocator traits to be used in collections!
-
penne
Penne is a pasta-oriented programming language that favors the goto-statement for flow control.
-
tao
A statically-typed functional language with generics, typeclasses, sum types, pattern-matching, first-class functions, currying, algebraic effects, associated types, good diagnostics, etc. (by zesterer)
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
Vec::retain(...) closure should receive &mut T instead of &T. E.g.: Both ArrayVec and SmallVec use F: FnMut(&mut T) -> bool. (https://github.com/rust-lang/rust/issues/25477)
Cloning `Rc/Arc` into closures is a genuine pain point — this is the situation I'm talking about here.
struct GithubClient { http: H, // .. } #[test] fn test_repo() { let gh = GithubClient::new(httpclient_from_fn(|request| { assert_eq!(request.uri(), "https://github.com/api/repos/rust-lang/rust"); Ok(Response { .. }) })); let repo = gh.get_repo("rust-lang", "rust").unwrap(); assert_eq!(repo.owner, "rust-lang"); assert_eq!(repo.name, "rust"); }
There are basically two options: - the (Scopes)[http://scopes.rocks] reference logic - the (Penne)[https://github.com/SLiV9/penne] reference logic
If you want some prior work on this, I've implemented effect-objects-as-return-values in my own language Tao, using uniqueness types. There's still work to be done, but I think it's sufficient as a proof of concept that this approach is viable without type soup.