Discover and read the best of Twitter Threads about #software_design

Most recents (1)

A thread on #cpp #state_machine #software_design.

Random ideas around writing an FSM library, with examples from, and motivations behind hfsm.dev, a header-only library created using #cpp template #metaprogramming with #gamedev, #embedded and #robotics in mind.
*Reuse vs reimplement*

State machines can be deceptively complex, and, unless a trivial one is needed, a reusable framework is highly recommended.

Rolling out one's own for special needs is ok.

Otherwise - pick from a variety of existing solutions from #boost, on #github, etc.
*Static vs dynamic structure*

The first important decision is whether the structure of FSM could be built/changed at runtime.

The implementation of a dynamic FSM relies on heap-allocated memory, resizable containers and pointers, all of which come at a steep perf price.
Read 22 tweets

Related hashtags

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3.00/month or $30.00/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!