You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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_engine invocations outside of engine.rs)
The text was updated successfully, but these errors were encountered:
The
glsp
namespace is currently cluttered with around 100 toplevel functions. When a new user looks at thedocs.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 thanArr::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 becomeCoro::new
, andglsp::step_by
could becomeGIter::step_by
. A quick headcount suggests that this would eliminate around 40 toplevel functions.Possible downsides:
Root
, which might be counterintuitivewith_engine
invocations outside ofengine.rs
)The text was updated successfully, but these errors were encountered: