Closed awong-dev closed 3 months ago
It's fine to keep getters, in that case a separate builder type is better so we don't need to name getters get_XXX()
, just use XXX()
like let use_hmm = config.use_hmm();
Gotcha. Will look into it. Need to sleep for now. :)
Fromt here https://github.com/messense/jieba-rs/pull/100/files#r1560432915
The builder pattern is indeed nicer here. The getters may still be wanted to allow other languages to query the rust struct w/o replicating the state...but builder does seem like a definite win.