Phantom types in Swift

This page summarizes the projects mentioned and recommended in the original post on /r/swift

InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • silt

    An in-progress fast, dependently typed, functional programming language implemented in Swift.

  • This is absolutely one of my favorite patterns. I really like using it to build state machines. Each state has a constrained extension full of behaviors and a method you can use to transit to the next state that just scoops all the data into a new container with a different tag. A light extension of that pattern is to then use associated/nested types dependent on the tags to define other behaviors such as custom state associated with each point in the machine. Conversely, behaviors common to every state can be added via an extension as per usual. Here’s a big hairy TypeChecker written following this pattern with its implementation split across an entire modules’ worth of files. Each transition point from elaboration to type checking to type inference is neatly contained by the tag which uniquely determines the state carried at each point.

  • CompCert

    The CompCert formally-verified C compiler

  • Yes, it is a false dichotomy to suggest one does not need tests because one has types. One needs both in systems of sufficient complexity. Even CompCert has a test suite, and it’s got a full formal proof of its own correctness!

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • So you think you know C?

    2 projects | news.ycombinator.com | 20 Jan 2024
  • Recently I am having too much friction with the borrow checker... Would you recommend I rewrite the compiler in another language, or keep trying to implement it in rust?

    1 project | /r/programmingcirclejerk | 27 Apr 2023
  • There is such thing called bugfree code.

    1 project | /r/ProgrammerHumor | 23 Dec 2022
  • Proofs about Programs

    1 project | news.ycombinator.com | 15 Dec 2022
  • Is "my version" of quick-sort incorrect?

    1 project | /r/learnprogramming | 9 Nov 2022