Skip to content

Commit

Permalink
Merge pull request #47 from myyrakle/feat/#12
Browse files Browse the repository at this point in the history
[#12] re-define primitives more rusty & implement ops traits
  • Loading branch information
myyrakle authored Oct 15, 2023
2 parents 6db7ccc + 453489c commit bc0bb9b
Show file tree
Hide file tree
Showing 6 changed files with 616 additions and 88 deletions.
22 changes: 11 additions & 11 deletions clone.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,55 +8,55 @@ func (self ISize) Clone() ISize {
return self
}

func (self ISize8) Clone() ISize8 {
func (self I8) Clone() I8 {
return self
}

func (self ISize16) Clone() ISize16 {
func (self I16) Clone() I16 {
return self
}

func (self ISize32) Clone() ISize32 {
func (self I32) Clone() I32 {
return self
}

func (self ISize64) Clone() ISize64 {
func (self I64) Clone() I64 {
return self
}

func (self USize) Clone() USize {
return self
}

func (self USize8) Clone() USize8 {
func (self U8) Clone() U8 {
return self
}

func (self USize16) Clone() USize16 {
func (self U16) Clone() U16 {
return self
}

func (self USize32) Clone() USize32 {
func (self U32) Clone() U32 {
return self
}

func (self USize64) Clone() USize64 {
func (self U64) Clone() U64 {
return self
}

func (self Float32) Clone() Float32 {
func (self F32) Clone() F32 {
return self
}

func (self Float64) Clone() Float64 {
func (self F64) Clone() F64 {
return self
}

func (self Byte) Clone() Byte {
return self
}

func (self Rune) Clone() Rune {
func (self Char) Clone() Char {
return self
}

Expand Down
44 changes: 22 additions & 22 deletions cmp.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func (self ISize) Cmp(rhs ISize) Ordering {
}
}

func (self ISize8) Cmp(rhs ISize8) Ordering {
func (self I8) Cmp(rhs I8) Ordering {
if self < rhs {
return OrderingLess
} else if self > rhs {
Expand All @@ -33,7 +33,7 @@ func (self ISize8) Cmp(rhs ISize8) Ordering {
}
}

func (self ISize16) Cmp(rhs ISize16) Ordering {
func (self I16) Cmp(rhs I16) Ordering {
if self < rhs {
return OrderingLess
} else if self > rhs {
Expand All @@ -43,7 +43,7 @@ func (self ISize16) Cmp(rhs ISize16) Ordering {
}
}

func (self ISize32) Cmp(rhs ISize32) Ordering {
func (self I32) Cmp(rhs I32) Ordering {
if self < rhs {
return OrderingLess
} else if self > rhs {
Expand All @@ -53,7 +53,7 @@ func (self ISize32) Cmp(rhs ISize32) Ordering {
}
}

func (self ISize64) Cmp(rhs ISize64) Ordering {
func (self I64) Cmp(rhs I64) Ordering {
if self < rhs {
return OrderingLess
} else if self > rhs {
Expand All @@ -73,7 +73,7 @@ func (self USize) Cmp(rhs USize) Ordering {
}
}

func (self USize8) Cmp(rhs USize8) Ordering {
func (self U8) Cmp(rhs U8) Ordering {
if self < rhs {
return OrderingLess
} else if self > rhs {
Expand All @@ -83,7 +83,7 @@ func (self USize8) Cmp(rhs USize8) Ordering {
}
}

func (self USize16) Cmp(rhs USize16) Ordering {
func (self U16) Cmp(rhs U16) Ordering {
if self < rhs {
return OrderingLess
} else if self > rhs {
Expand All @@ -93,7 +93,7 @@ func (self USize16) Cmp(rhs USize16) Ordering {
}
}

func (self USize32) Cmp(rhs USize32) Ordering {
func (self U32) Cmp(rhs U32) Ordering {
if self < rhs {
return OrderingLess
} else if self > rhs {
Expand All @@ -103,7 +103,7 @@ func (self USize32) Cmp(rhs USize32) Ordering {
}
}

func (self USize64) Cmp(rhs USize64) Ordering {
func (self U64) Cmp(rhs U64) Ordering {
if self < rhs {
return OrderingLess
} else if self > rhs {
Expand All @@ -113,7 +113,7 @@ func (self USize64) Cmp(rhs USize64) Ordering {
}
}

func (self Float32) Cmp(rhs Float32) Ordering {
func (self F32) Cmp(rhs F32) Ordering {
if self < rhs {
return OrderingLess
} else if self > rhs {
Expand All @@ -123,7 +123,7 @@ func (self Float32) Cmp(rhs Float32) Ordering {
}
}

func (self Float64) Cmp(rhs Float64) Ordering {
func (self F64) Cmp(rhs F64) Ordering {
if self < rhs {
return OrderingLess
} else if self > rhs {
Expand Down Expand Up @@ -163,7 +163,7 @@ func (self Byte) Cmp(rhs Byte) Ordering {
}
}

func (self Rune) Cmp(rhs Rune) Ordering {
func (self Char) Cmp(rhs Char) Ordering {
if self == rhs {
return OrderingEqual
} else if self > rhs {
Expand Down Expand Up @@ -191,47 +191,47 @@ func (self ISize) Eq(rhs ISize) Bool {
return self == rhs
}

func (self ISize8) Eq(rhs ISize8) Bool {
func (self I8) Eq(rhs I8) Bool {
return self == rhs
}

func (self ISize16) Eq(rhs ISize16) Bool {
func (self I16) Eq(rhs I16) Bool {
return self == rhs
}

func (self ISize32) Eq(rhs ISize32) Bool {
func (self I32) Eq(rhs I32) Bool {
return self == rhs
}

func (self ISize64) Eq(rhs ISize64) Bool {
func (self I64) Eq(rhs I64) Bool {
return self == rhs
}

func (self USize) Eq(rhs USize) Bool {
return self == rhs
}

func (self USize8) Eq(rhs USize8) Bool {
func (self U8) Eq(rhs U8) Bool {
return self == rhs
}

func (self USize16) Eq(rhs USize16) Bool {
func (self U16) Eq(rhs U16) Bool {
return self == rhs
}

func (self USize32) Eq(rhs USize32) Bool {
func (self U32) Eq(rhs U32) Bool {
return self == rhs
}

func (self USize64) Eq(rhs USize64) Bool {
func (self U64) Eq(rhs U64) Bool {
return self == rhs
}

func (self Float32) Eq(rhs Float32) Bool {
func (self F32) Eq(rhs F32) Bool {
return self == rhs
}

func (self Float64) Eq(rhs Float64) Bool {
func (self F64) Eq(rhs F64) Bool {
return self == rhs
}

Expand All @@ -247,7 +247,7 @@ func (self Byte) Eq(rhs Byte) Bool {
return self == rhs
}

func (self Rune) Eq(rhs Rune) Bool {
func (self Char) Eq(rhs Char) Bool {
return self == rhs
}

Expand Down
66 changes: 33 additions & 33 deletions fmt.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,55 +13,55 @@ func (self ISize) Display() String {
return self.ToString()
}

func (self ISize8) Display() String {
func (self I8) Display() String {
return self.ToString()
}

func (self ISize16) Display() String {
func (self I16) Display() String {
return self.ToString()
}

func (self ISize32) Display() String {
func (self I32) Display() String {
return self.ToString()
}

func (self ISize64) Display() String {
func (self I64) Display() String {
return self.ToString()
}

func (self USize) Display() String {
return self.ToString()
}

func (self USize8) Display() String {
func (self U8) Display() String {
return self.ToString()
}

func (self USize16) Display() String {
func (self U16) Display() String {
return self.ToString()
}

func (self USize32) Display() String {
func (self U32) Display() String {
return self.ToString()
}

func (self USize64) Display() String {
func (self U64) Display() String {
return self.ToString()
}

func (self Float32) Display() String {
func (self F32) Display() String {
return self.ToString()
}

func (self Float64) Display() String {
func (self F64) Display() String {
return self.ToString()
}

func (self Byte) Display() String {
return self.ToString()
}

func (self Rune) Display() String {
func (self Char) Display() String {
return self.ToString()
}

Expand Down Expand Up @@ -99,56 +99,56 @@ func (self ISize) Debug() String {
return String(fmt.Sprintf("ISize(%s)", self.ToString()))
}

func (self ISize8) Debug() String {
return String(fmt.Sprintf("ISize8(%s)", self.ToString()))
func (self I8) Debug() String {
return String(fmt.Sprintf("I8(%s)", self.ToString()))
}

func (self ISize16) Debug() String {
return String(fmt.Sprintf("ISize16(%s)", self.ToString()))
func (self I16) Debug() String {
return String(fmt.Sprintf("I16(%s)", self.ToString()))
}

func (self ISize32) Debug() String {
return String(fmt.Sprintf("ISize32(%s)", self.ToString()))
func (self I32) Debug() String {
return String(fmt.Sprintf("I32(%s)", self.ToString()))
}

func (self ISize64) Debug() String {
return String(fmt.Sprintf("ISize64(%s)", self.ToString()))
func (self I64) Debug() String {
return String(fmt.Sprintf("I64(%s)", self.ToString()))
}

func (self USize) Debug() String {
return String(fmt.Sprintf("USize(%s)", self.ToString()))
}

func (self USize8) Debug() String {
return String(fmt.Sprintf("USize8(%s)", self.ToString()))
func (self U8) Debug() String {
return String(fmt.Sprintf("U8(%s)", self.ToString()))
}

func (self USize16) Debug() String {
return String(fmt.Sprintf("USize16(%s)", self.ToString()))
func (self U16) Debug() String {
return String(fmt.Sprintf("U16(%s)", self.ToString()))
}

func (self USize32) Debug() String {
return String(fmt.Sprintf("USize32(%s)", self.ToString()))
func (self U32) Debug() String {
return String(fmt.Sprintf("U32(%s)", self.ToString()))
}

func (self USize64) Debug() String {
return String(fmt.Sprintf("USize64(%s)", self.ToString()))
func (self U64) Debug() String {
return String(fmt.Sprintf("U64(%s)", self.ToString()))
}

func (self Float32) Debug() String {
return String(fmt.Sprintf("Float32(%s)", self.ToString()))
func (self F32) Debug() String {
return String(fmt.Sprintf("F32(%s)", self.ToString()))
}

func (self Float64) Debug() String {
return String(fmt.Sprintf("Float64(%s)", self.ToString()))
func (self F64) Debug() String {
return String(fmt.Sprintf("F64(%s)", self.ToString()))
}

func (self Byte) Debug() String {
return String(fmt.Sprintf("Byte(%s)", self.ToString()))
}

func (self Rune) Debug() String {
return String(fmt.Sprintf("Rune(%s)", self.ToString()))
func (self Char) Debug() String {
return String(fmt.Sprintf("Char(%s)", self.ToString()))
}

func (self String) Debug() String {
Expand Down
Loading

0 comments on commit bc0bb9b

Please sign in to comment.