Softanza
StartFrançais
Softanza
Core data & language

Collections & objects

Engine-backed functional pipeline plus a reflective object root; boxed storage caps native set-op speed.

6 Strong · 5 Solid · 1 Partial · 0 Emerging

Measured against: Lodash · Immutable.js · standard libraries · Folders: base/list(opens in a new tab) · base/object(opens in a new tab) · For programmers: this area's reference

the same twelve values, before and after one call
the same twelve values, before and after one call. drawn on 2026-10-01 by the site's script tools/areas-figurative.ring, run inside the library at commit 0e72e2e2c · the source(opens in a new tab)

Rethought from first principles

What Softanza kept from what works, and what it rethought, as the library wrote it down in its design documents and narrations.

The Softanza wayThe same few questions — does it contain, how many, where — and the same verbs work on every structure; only the unit of position changes.

Kept from the best practice

  • Default truth stays the platform's own: empty is false, something is true; IsTrue() behaves exactly like the native test before any extension. source(opens in a new tab)
  • Keeps the usual safe-lookup discipline: check that a key exists (HasKey, HasPath) before reading it, so a lookup never silently creates an empty entry. source(opens in a new tab)

Rethought

  • Strings and lists answer the same verbs — Contains, NumberOfOccurrence, FindAll — and StzFind accepts either, so one way of thinking covers every structure. source(opens in a new tab)
  • A method's form carries its effect: Remove() changes the object, Removed() returns a changed copy, RemoveQ() chains, so side effects are visible in the name. source(opens in a new tab)
  • Truth can be configured: IsTrueXT() lets a program declare which items or words make a list or string false, instead of one fixed empty-equals-false rule. source(opens in a new tab)
  • An object can keep the story of its changes: QH() records every step of a chain, because a transformation normally leaves no trace of its path. source(opens in a new tab)

One of the largest surfaces in the library: ~155 list operations in a 6,500-line Zig core behind a 1,600-method Haro face, a functional pipeline, deep-path search, Lodash-grade grouping, and a reflective object root that 449 classes inherit, tuned for millions of items with measured residency wins. Two honest limits keep it short of the very top: boxed value storage holds raw set-op throughput an order of magnitude below NumPy/native, and there are no persistent immutable structures.

What a crafter does with it, and what stands out

  • String-expression predicates run inside the engine, which the peers cannot do
  • A deep-path search API that Lodash get only approximates
  • A reflective object root 449 classes inherit, with Q-elevation and the Verb/Verbed/VerbQ grammar
  • Measured residency wins at 1M items: 2.6x read-reuse, Classify -51%, Union -34%

What is owed

  • Finish the list narration / fidelity grind (312 of ~602 legacy blocks error)
  • Unboxed typed storage for native-speed set-ops
  • Complete the residency migration (Slices 4 and 5, ~32 marshal-in sites)
  • Persistent immutable collections with structural sharing

The Softanza way, run

What Softanza does differently in this area, shown by code taken from its narrations and guards, and run for this page.

One function finds a value in a string or in a list; only the unit changes, characters or items.

Softanza
? @@( StzFind("tea", "tea rice tea fish") )
? @@( StzFind("tea", [ "tea", "rice", "tea", "fish" ]) )
Output
[ 1, 10 ]
[ 1, 3 ]

run on 2026-10-01 21:17 inside the library at commit 0e72e2e2c; taken from base/education/program/courses/elementary-introduction/chapters/05-one-object-any-structure.en.md(opens in a new tab)

A chain of changes keeps its history: the starting value and the result of every step.

Softanza
? @@( QH("1 AA 2 B 3 CCC 4 DD 5 Z").
	RemoveCharsWQ('Q(@Char).IsNumberInString()').
	RemoveSpacesQ().
	RemoveDuplicatedCharsQ().
	History() )
Output
[ "1 AA 2 B 3 CCC 4 DD 5 Z", " AA  B  CCC  DD  Z", "AABCCCDDZ", "ABCDZ" ]

run on 2026-10-01 21:17 inside the library at commit 0e72e2e2c; taken from base/test/string/466_keeping_the_history_of_updates_of_a_softanza_objec.ring(opens in a new tab)

Truth is configurable: once 'no' and 'off' are declared as markers, a string containing one counts as false.

Softanza
SetSubStringsMakingAStringFalse([ "no", "off" ])
Then("a string carrying a marker is FALSE", IsTrueXT("no way"), FALSE)
Then("...and IsFalseXT says so", IsFalseXT("no way"), TRUE)
Then("a string without one is still TRUE", IsTrueXT("Hello"), TRUE)
Output
  THEN  a string carrying a marker is FALSE  [PASS]
  THEN  ...and IsFalseXT says so  [PASS]
  THEN  a string without one is still TRUE  [PASS]

run on 2026-10-01 21:17 inside the library at commit 0e72e2e2c; taken from base/test/func/00_func_narrated.ring(opens in a new tab)

The articles of this area (15)

The lanes, one by one

Lanes and their notes are quoted as they were read at the source, on Read from the source on 2026-09-16.

Core list operations
Strong
Index, slice, section, insert, remove, reverse, swap, rotate, repeat; reads engine-backed (stz_list_get/slice/reverse/rotate); mutators hop through Harostz_list_get / slice / reverse / rotate
Functional pipeline (map, filter, reduce)
Strong
Engine-backed map_expr/filter_expr/reduce_expr with a string DSL (@item, @accumulator) plus W (engine) and WF (Haro function) predicate modesmap_expr / filter_expr / reduce_expr
Search, find, contains, deep paths
Strong
Finder family engine-backed (find_cs, find_all_cs, find_nth_cs, contains_cs) plus a deep-path API (deep_find, item_at_path, paths_at_depth)find_cs / deep_find / find_all_held_cs
Set operations
Solid
Union, intersection, difference, subset, unique engine-backed with a splitmix64 fast path; intersection_cs dedups, common_items_cs keeps dups; 1M union ~2-3sstz_list_union_cs
Grouping, partition, chunk, zip
Strong
classify_cs, partition, chunked, zip, interleave, sliding_window, frequencies_cs engine-backed; classify emits the nested shape engine-side (-51% at 1M)classify_cs (-51% at 1M)
Sorting and ordering
Strong
sort, sort_cs, sort_descending, sort_by_expr, sort_on, sorted_insert plus is_sorted / is_strictly_increasing / is_monotonic, all engine-backedsort_by_expr / sort_on
Aggregation and statistics on lists
Solid
sum, product, mean, median, variance, stddev, nth_largest, ranked engine-backed, also on stzListOfNumbers; deep statistics lives on the Statistics page
Immutability and copy semantics
Partial
Haro assigns lists by value (safe by default, clean Copy()) but no persistent immutable structures with structural sharing; a modified copy is a full copy
Large-scale performance and residency
Solid
Generation-keyed cache (FIFO at 8M items / 1024 entries): read-reuse 3.34s to 1.29s, Classify -51%, Union -34% at 1M; boxed *StzValue, Slices 4-5 open_ENGINE_RESIDENCY_PLAN.md; bridge_list.zig
The object system (stzObject root)
Strong
One reflective root inherited by 449 classes: Attributes, Methods, Type, ObjectUID, cloning, Q-elevation, Verb/Verbed/VerbQ; #TODO notes incomplete abstractionbase/object/stzObject
Specialized collections
Solid
stzHashList, stzGrid, stzTree, stzSet, stzListOfLists, stzListOfPairs, stzListOfSections, stzYielder; mostly Haro-side; stzHashList folds keys to lowercase
Named-parameter grammar
Solid
stzListNamedParams, a 1,945-method grammar for natural-language named arguments with no direct peer; pure Haro and the least-verified under the fidelity grindstzListNamedParams