How do their APIs compare?
How do their APIs compare?
About louthy/language-ext · 2 messages · last activity 9/8/2026
I should be upfront about a scoping issue here: language-ext and wavefunctioncollapse are fundamentally different kinds of projects, so "API comparison" means something quite different for each. Let me lay out what I can actually support from the retrieved data, and flag where I'd want to search for more before saying anything definitive about surface area.
louthy/language-ext — a library API (broad, class-instance driven)
Language-ext exposes its API primarily through:
- Class instances / typeclass-style structs implementing shared interfaces like
Eq<A>andHashable<A>. For exampleEqString,EqGuid,EqDateTime,EqArray,EqIdentityall implement a commonEquals/GetHashCodecontract [LanguageExt.Core/Class Instances/Eq/EqGuid.cs:L19-L27], [LanguageExt.Core/Class Instances/Eq/EqDateTime.cs:L19-L27], [LanguageExt.Core/Class Instances/Eq/EqArray.cs:L51-L59], [LanguageExt.Core/Class Instances/Eq/EqIdentity.cs:L18-L26]. This is a trait/typeclass pattern — many small structs conforming to a shared interface, rather than one big class hierarchy. - A fallback/default resolution mechanism:
HashableDefault<A>tries to find an appropriateHashableinstance from loaded assemblies and falls back toObject.GetHashCode()[LanguageExt.Core/Class Instances/Hashable/HashableDefault.cs:L1-L17]. This reflects the library's broader "traits" design (mentioned in the README's Features list under "Traits" and "Value traits"). - Per the README's contents outline, the actual consumable API spans functional effects/IO, atomic concurrency, immutable collections, functional streams, optional/alternative monads, state-managing monads, parser combinators, pretty-printing, and differencing — i.e., it's a large multi-module functional programming toolkit, not a single-purpose API. The full method-level reference lives outside what's retrieved here (the README points to a hosted API Reference site rather than embedding one).
mxgmn/wavefunctioncollapse — not a library API, an application entry point
This project is structured as a single console application, not a reusable API surface:
Program.Mainin [Program.cs:L7-L73] loadssamples.xml, builds either anOverlappingModelorSimpleTiledModeldepending on the<overlapping>/<simpletiled>XML element, and callsmodel.Run(seed, limit)thenmodel.Save(...).- The shared abstraction is the
Modelbase class, with aHeuristicenum (Scanline,MRV,Entropy) and aRun/Savemethod pair used polymorphically overOverlappingModelandSimpleTiledModel[Program.cs:L20-L23, L44-L58]. - Internally,
Model.csexposes propagation mechanics likeBan(int i, int t)and the constraint-propagation loop that decrements compatibility counts and updates entropy bookkeeping [Model.cs:L165-L204] — this is implementation detail, not a public API meant for external consumers in the way language-ext's typeclasses are. OverlappingModel's constructor-time logic builds patterns from an input bitmap using symmetry transforms (reflect/rotate) [OverlappingModel.cs:L46-L85] — again, this is model-construction logic driven by XML config, not a general-purpose API for other programs to call into.
Bottom line comparison
- Language-ext is designed as an API/framework: it deliberately layers interfaces, traits, and class instances so consuming code can be written declaratively against abstractions (
Eq<A>,Hashable<A>, etc.). - wavefunctioncollapse is not designed to be consumed as a library API at all — it's a single-executable research/demo tool driven by an XML config file (
samples.xml) and aProgram.Mainentry point [Program.cs:L7-L18]. Its "API" (theModel,OverlappingModel,SimpleTiledModelclasses) is internal architecture, not a published/versioned interface for external integration — there's no NuGet-style packaging or reference docs analogous to language-ext's.
If you want, I can search the code for
Want to ask your own question?
Open chat for louthy/language-extPublic Q&A. Generated by RepoPilot from the actual source of louthy/language-ext. AI answers can be incomplete or stale — verify before relying on them.