Code Monkey home page Code Monkey logo

Comments (6)

cnuernber avatar cnuernber commented on July 19, 2024

Thank you, my hope is to allow clojure and python to deeply intermix and give both python and clojure people incremental and efficient pathways to work together.

I completely agree about syntax. I would personally vote for building out namespaces so for instance a numpy namespace. Let's see if anyone else chimes in.

from libpython-clj.

cnuernber avatar cnuernber commented on July 19, 2024

This issue is solved by Alan Marazzi's panthera.

from libpython-clj.

davidpham87 avatar davidpham87 commented on July 19, 2024

Just about syntax, we could inspire ourselves from Hy (lisp for python), for function call:

http://docs.hylang.org/en/stable/tutorial.html

They use a #* and #** for the python equivalent.

from libpython-clj.

cnuernber avatar cnuernber commented on July 19, 2024

The general direction I like. Some sugar around keyword arguments would be nice; I think it might take the form of a macro or something that analyzed the argument types and if there were an odd number of arguments after the first keyword argument would default to call-kw.

This:

(optional-arg #* args #** kwargs)
[1, 2, 4, 3]

Would expand directly to:

(call-kw optional-arg args kwargs)

What we don't have is the python compiler deciding what goes in the arglist and the keyword argmap; I believe this would have to be done by a macro.

from libpython-clj.

cnuernber avatar cnuernber commented on July 19, 2024

I should add that I know Alan has experimented with a couple different directions here and he is still working on it. I think Panthera has a couple motivational examples.

from libpython-clj.

davidpham87 avatar davidpham87 commented on July 19, 2024

I still believe that modules should have the namespace syntax, but I like how Alan solved the problem for numpy.

from libpython-clj.

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.