Skip to content

Auto constructor for structs #62

@fogfish

Description

@fogfish

As a Engineer I want to automate simple constructors so that allocation of new type is an "arrow function: (A, B, C) => T" eliminates the boilerplate

type T struct {
  a A
  b B
  c C
}

var NewT = hseq.Arrow3[T, A, B, C]

As hypothesis we eliminate boilerplate:

func NewT(a A, b B, c C) *T {
  return &T{a:a, b:b, c:c)
}

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions