Git Product home page Git Product logo

Comments (5)

carocad avatar carocad commented on July 22, 2024

@bhb not sure if this is also relevant but shouldnt the syntax error above also show the let part?

Currently it seems to be stripped away which puts away part of the context of the expression.

from expound.

bhb avatar bhb commented on July 22, 2024

@carocad Yes, I agree, it should show the let part - that would make things much more clear.

Unfortunately, the data from spec doesn't currently include the function/macro name. It'd be great if this was fixed - please vote for https://dev.clojure.org/jira/browse/CLJ-2271 😄

Until the above bug is fixed, I'm considering adding a placeholder, so this would look like:


  (<f> [a] ...)
   ^^^

... to indicate these are args to a macro. What do you think about the idea of using a placeholder? Does it help or just confuse things? Is <f> a good enough placeholder? Or would you prefer something more verbose like <fn-or-macro>? Something else?

from expound.

carocad avatar carocad commented on July 22, 2024

@bhb if I would have to choose between no macro info and placeholder I would choose no macro info. Since I am typing the code I can get a pretty rough idea of where the execution failed based on the rest of the info. I think that putting a placeholder would only confuse things since that is nowhere to be found in the code that the user wrote.

So far I have only encountered this problem for Clojure code since I almost dont use macros. With the inclusion of #44 the error gets so evident that it is very difficult to not identify where the problem is happening.

That might not be true for people that create and use lots of macros though. but I guess if they would have that problem they could report it here 😸

from expound.

bhb avatar bhb commented on July 22, 2024

@carocad Thanks for the feedback!

from expound.

bhb avatar bhb commented on July 22, 2024

The fix will be in the next release, currently in 0.7.1-SNAPSHOT.

from expound.

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.