Docs

Everything You Need to Know

Stacks

Intro

Truck Engine

Stacks are a simple abstraction layer for arrays. This framework was conceptualized and then built because of experimenting with an early version of Stacks. OK, so arrays are already awesome. Why do we need stacks? Because you can sometimes damage the integrity of your data, or you code can do so without you realizing it. An abstraction help prevent unexpected changes from happening. When you put an array into a stack, it can only be accessed through the interface of the Stack. As a plus, some of the native array methods that everyone uses are not optimized for performance. In the Stack implementation we work around this to create the fastest version of those methods as possible.

You don't have to use Stacks, but internally Truck is using Stacks and variations of Stacks to work its magic for you.