Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8320285

Custom operator behaviours

    XMLWordPrintable

Details

    • generic
    • generic

    Description

      A DESCRIPTION OF THE PROBLEM :
      Dear Java Developers.
      Shortly, I would love to see something like custom operator behaviours in java, just like they are already in C#.
      ex.:
      public static Vector2 operator +(Vector2 a, Vector2 b)
              => new Vector2(a.x + b.x, a.y + b.y);

      and so now you can do:
      var res = new Vector2(1, 1) + new Vector2(4, 5);

      That would make java development way more easier.

      So thanks for everything and keep on doing great job!!!

      Regards,
      Andrzej


      Attachments

        Activity

          People

            adev ANUPAM DEV
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: