Skip to content

Comment on Functional State Machines in Rust: Typestate and Newtype Patternsparent

Comments

From a language design perspective I go back and forth on named params. I think the only conclusion I’ve reached is that I am not in favor of them being optional, but I think that is more a concern for implementation of the language and less about how it effects users.

How do you find the feature useful in this instance, I can’t quite picture how that works for typestate pattern functions.

It's mainly naming conventions so functions read more like a sentence, so `send_action(to_cell: X)`.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.