Giter Club home page Giter Club logo

Comments (8)

borkdude avatar borkdude commented on September 27, 2024 1

That was a typo. Writing extend is simple.

from clj-kondo.

borkdude avatar borkdude commented on September 27, 2024 1

I think we could improve the error message to say that the class name must be a simple symbol

from clj-kondo.

borkdude avatar borkdude commented on September 27, 2024

You can't officially use (Class/forName "[B") with extend-protocol.
Only class names are allowed, not expressions. That it works is accidental. In this case it's better to write the extend call manually. I can give links where this is discussed later on. One of the issues with doing what you do above is that it becomes unreliable when you have multiple expressions like that.

from clj-kondo.

arichiardi avatar arichiardi commented on September 27, 2024

I see, did not know that!

better to write the extend call or simply (?)

I'd like to know what "simply" is here cause I like simple :)

from clj-kondo.

borkdude avatar borkdude commented on September 27, 2024

In Clojure 1.12 you will be able to write (extend-protocol IFoo byte* ...)

from clj-kondo.

borkdude avatar borkdude commented on September 27, 2024

Here is the relevant JIRA: https://clojure.atlassian.net/browse/CLJ-1381
Slack discussion: https://clojurians.slack.com/archives/CHY97NXE2/p1677266201633939

from clj-kondo.

borkdude avatar borkdude commented on September 27, 2024

Also see https://clojure.atlassian.net/browse/CLJ-2836

from clj-kondo.

borkdude avatar borkdude commented on September 27, 2024

I'll leave this issue open until CLJ-2836 is resolved.

from clj-kondo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.