# Rhombus : + on draw.Point

**URL:** <https://racket.discourse.group/t/rhombus-on-draw-point/4364>\
**Category:** Questions & Answers\
**Tags:** rhombus\
**Created:** [September 1, 2026, 6:30am UTC](https://racket.discourse.group/t/rhombus-on-draw-point/4364 "2026-09-01T06:30:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dharmatech](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/dharmatech/32/1996_2.png) [@dharmatech](https://racket.discourse.group/u/dharmatech)\
**Post date:** [September 1, 2026, 6:30am UTC](https://racket.discourse.group/t/rhombus-on-draw-point/4364/1 "2026-09-01T06:30:36Z")

</div>

Hey y'all 🙋‍♂️

Is there a way to use `+` on `draw.Point`?

So, something like this:

```scheme
#lang rhombus/static

import:
  draw open

operator ((a :: Point) + (b :: Point)):
  Point(a.x + b.x, a.y + b.y)

def a = Point(1, 2)
def b = Point(3, 4)

a + b

```

If I use the above, I get this:

```scheme
$ rhombus /tmp/journal/2026-08-31/test-operator-point-add.rhm 
+: argument does not satisfy annotation
  argument: 1
  annotation: Point
  context...:
   /tmp/journal/2026-08-31/test-operator-point-add.rhm:6:0: +
   body of "/tmp/journal/2026-08-31/test-operator-point-add.rhm"
   /home/dharmatech/.local/share/racket/9.3/pkgs/rhombus-exe/rhombus/run.rhm:154:0: import_module
   .../amalgam/effect.rkt:22:19
   body of "/home/dharmatech/.local/share/racket/9.3/pkgs/rhombus-exe/rhombus/run.rhm"

```

Thanks for any suggestions!

Ed

---

<div class="post-metadata">

**Author:** ![dharmatech](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/dharmatech/32/1996_2.png) [@dharmatech](https://racket.discourse.group/u/dharmatech)\
**Post date:** [September 1, 2026, 6:39am UTC](https://racket.discourse.group/t/rhombus-on-draw-point/4364/2 "2026-09-01T06:39:36Z")

</div>

It looks like this works:

```scheme
#lang rhombus/static

import:
  draw open
  lib("racket/base.rkt") as rkt

operator +:
  ~weaker_than: * /
  ~same_as: -
  ~associativity: ~left
| ((a :: Point) + (b :: Point)) :: Point:
    Point(rkt.#{+}(a.x, b.x),
          rkt.#{+}(a.y, b.y))
| ((a :: Number) + (b :: Number)) :: Number:
    rkt.#{+}(a, b)

def a = Point(1, 2)
def b = Point(3, 4)

a + b

```

But, I'm not sure if that's considered idiomatic Rhombus (i.e. reaching directly into `rkt`).

---

<div class="post-metadata">

**Author:** ![usao](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/usao/32/1375_2.png) [@usao](https://racket.discourse.group/u/usao)\
**Post date:** [September 2, 2026, 6:39pm UTC](https://racket.discourse.group/t/rhombus-on-draw-point/4364/3 "2026-09-02T18:39:55Z")

</div>

The error you got is because the `+` inside the definition body refers to the `+` you’re defining. If you `import` `rhombus` separately, you can then refer to the `+` from `rhombus` as `rhombus.(+)`:

```scheme
import:
  rhombus

1 rhombus.(+) 2

```

You can also use an alternative prefix with `as`.

---

<div class="post-metadata">

**Author:** ![dharmatech](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/dharmatech/32/1996_2.png) [@dharmatech](https://racket.discourse.group/u/dharmatech)\
**Post date:** [September 3, 2026, 12:29am UTC](https://racket.discourse.group/t/rhombus-on-draw-point/4364/4 "2026-09-03T00:29:25Z")

</div>

Thank you, @usao! 🤝
