Skip to content

Instantly share code, notes, and snippets.

Variable Isolation

Memory graph isolation, is a form of a immutable references within a programs graph of memory to create subgraphs which do not reference others.

In this proposal a focus is upon the analysis on the graph in creating and maintaining isolate sub graphs. It takes advantage of DIP1000 for escape analysis of reference into and out of sub graph manipulation functions.

Literature Review

https://dl.acm.org/doi/10.1145/3167132.3167245

Depends upon: member of operator

SumTypes

Sum types are a union of types, as well as a union of names. Some names will be applied to a type, others may not be.

It acts as a tagged union, using a tag to determine which type or name is currently active.

The matching capabilities are not specified here.

PR: dlang/dmd#16161

Member Of Operator

The member of operator, is an operator that operates on a contextual type with respect to a given statement, declaration or expression.

It may appear as the first term in an expression, then it may be followed with binary and dot expressions.

The syntax of the operator is ':' Identifier.

Call Site UDA's

Requirements

Can only be used for functions that are templated, on runtime parameters.

Storage

A UDA on the argument, will be stored with the argument position.

Attribute Contracts

When to Apply

Attribute contracts apply when the type checker fails to coerce and validate a function call, that has function or delegate pointer arguments.

An attribute contract does not change how a function's body and in contract gets typed checked. These get typed checked with the assumption that the stated attributes were valid during the call.

Sets

@rikkimax
rikkimax / formattablestring.md
Last active October 18, 2023 05:30
Formattable string DIP idea

Fundamental syntax requirements

  • Has four parts in a syntax
    • Prefix string literal
    • Mapping to another argument via offset
    • Expression
    • Format string literal
  • Must work for code generation
  • Must work for business logic (i.e. date/time heavy code)

Symbol Representation

Field Value
DIP:
Author: Richard (Rikki) Andrew Cattermole (firstname@lastname.co.nz)
Implementation:
Status: Draft

Abstract

@rikkimax
rikkimax / CBL.txt
Last active February 6, 2022 03:31
Draft: Contribute Back License - DO NOT USE
# Contribute Back License - $VersionX - $Date
Owners: $IPOwners
Project: $ProjectURL
# Purpose
This license let you (the "User" an individual or organization) to use, share and modify this Project in any form,
as long as you contribute to the continuing development and support of the Project.
module reusable.compression.internal.array;
import reusable.array : InputStreamRequest;
import reusable.exceptions : MalformedInputException;
struct InputBitBuffer {
InputStreamRequest inputBuffer;
uint bufferByteBitsLeft;
ubyte bufferByte;