disalloweq

package
v0.0.0-...-1f23a7b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 4, 2023 License: BSD-3-Clause Imports: 0 Imported by: 0

Documentation

Overview

Package disalloweq provides a method for disallowing struct comparisons with the `==` operator.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DisallowEqual

type DisallowEqual [0]func()

DisallowEqual can be used to cause the compiler to reject attempts to compare structs with the `==` operator.

This is useful as the Scalar and FieldElement types should not be comparable via the `==` operator as the internal representation of both are not guaranteed to be canonical (ie: fully reduced).

The better solution would be for Go to embrace circa 1960s technology and support operator overloading a la ALGOL 68.

See: https://twitter.com/bradfitz/status/860145039573385216

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL