-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
The glsp namespace is currently cluttered with around 100 toplevel functions. When a new user looks at the docs.rs page, I expect this doesn't make a great first impression. The functions are also quite verbose (glsp:: is six characters), they're not very self-documenting at the call site (glsp::arr_from_iter is debatably less clear than Arr::from_iter), and they introduce name-collision problems in the prelude.
Many of the toplevel constructors could be converted into associated functions. For example, glsp::coro could become Coro::new, and glsp::step_by could become GIter::step_by. A quick headcount suggests that this would eliminate around 40 toplevel functions.
Possible downsides:
- Most of the constructors would return a
Root, which might be counterintuitive - This change could make constructors less discoverable
- It would make the codebase less organised (we would need to add many
with_engineinvocations outside ofengine.rs)
Metadata
Metadata
Assignees
Labels
No labels