Skip to content

custom operators #24

Open
Open
@pablogrisafi1975

Description

@pablogrisafi1975

You are a genius! Thanks for your wonderful job!
What about defining custom operators? maybe not as flexible as Scala, when you can have the pope operator <+|:-) if you want. But I was thinking about the eq operator, so
a eq b means Object.equals(a, b). It allows you to skip null checks, keep the == for references, and it is nicer on the eye.

Also, one small thing, the example code is somehow wrong, map.get("qwe")==null is not the same as map.containsKey("qwe") unless map is null free.

(I was also going to ask about null handling with ?, but pretty much everything I want to ask is already written in 'ideas' file)

Again, incredible work!

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions