clojure

What are Clojure's Naming Conventions?

Deadly 提交于 2019-12-18 11:40:25
问题 Can anyone explain or point me to where I can find clojure's naming conventions for: File names Functions (From what I understand, function names are simply dash separated values) Variables 回答1: You might want to look at the Clojure library coding standards on the developer Wiki - this is probably the most comprehensive list that I've seen. To your specific points: File names are lowercase, and stored in a directory structure to match the namespace, and end in .clj e.g. "my/special/namespace

Clojure and Java interop in a real world

烈酒焚心 提交于 2019-12-18 11:11:37
问题 I'm thinking about start using (not playing with) Clojure. Are there any useful guides? I'm not asking about lein, javac or any other 'small' manual tools. I need to know how to have Java and Clojure sources in eclipse in the same project. How to make them calling each other without compilation errors? How to configure maven? How to set up fully productive development environment? Is it even possible at the moment? What plugins may be useful? Where to start? 回答1: I have a fully working

Clojure and Java interop in a real world

一世执手 提交于 2019-12-18 11:11:33
问题 I'm thinking about start using (not playing with) Clojure. Are there any useful guides? I'm not asking about lein, javac or any other 'small' manual tools. I need to know how to have Java and Clojure sources in eclipse in the same project. How to make them calling each other without compilation errors? How to configure maven? How to set up fully productive development environment? Is it even possible at the moment? What plugins may be useful? Where to start? 回答1: I have a fully working

Learning Clojure - What should I know about Java and more [closed]

社会主义新天地 提交于 2019-12-18 10:48:16
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 6 months ago . I have started learning Clojure recently, my main programming language is Ruby and I have no Java experience whatsoever. Which Java standard classes are a must to know when working with Clojure? Obviously Clojure doesn't come with a wrapper for everything and a lot of

How does Clojure approach Separation of Concerns?

五迷三道 提交于 2019-12-18 10:36:07
问题 How does Clojure approach Separation of Concerns ? Since code is data, functions can be passed as parameters and used as returns... And, since there is that principle "Better 1000 functions that work on 1 data structure, than 100 functions on 100 data structures" (or something like that). I mean, pack everything a map, give it a keyword as key, and that's it ? functions, scalars, collections, everything... The idea of Separation of Concerns is implemented, in Java, by means of Aspects (aspect

Why is the use of Maybe/Option not so pervasive in Clojure?

两盒软妹~` 提交于 2019-12-18 10:32:33
问题 Why does Clojure, despite such an emphasis on functional paradigm, not use the Maybe / Option monad to represent optional values? The use of Option is quite pervasive in Scala, a functional programming language I use regularly. 回答1: Clojure is not statically typed, so doesn't need the strict this/that/whatever type declarations that are necessary in haskell (and, I gather, Scala). If you want to return a string, you return a string; if you return nil instead, that's okay too. "Functional"

clojure and leiningen - using a git repository as dependency

血红的双手。 提交于 2019-12-18 10:19:42
问题 Is it possible to have leiningen pull a project directly from a git repository (on github) as a dependency? Using Bundler with Ruby, it is possible to map a gem to a git repo, allowing for rapid development and integration of dependent projects. Update Based on the accepted answer, there is now a leiningen plugin for managing git-deps: https://github.com/tobyhede/lein-git-deps 回答1: Answer for 2017: Use lein-voom You can use lein-voom to pull and build project dependencies from GitHub or other

How to benchmark functions in Clojure?

浪尽此生 提交于 2019-12-18 10:13:49
问题 I know I can get the time take to evaluate a function can be printed out on the screen/stdout using the time function/macro. The time macro returns the value of the evaluated function, which makes it great to use it inline. However I want to automatically measure the runtime under specific circumstances. Is there a function which returns the elapsed time in some library to help with this benchmarking? 回答1: You might want to look into Hugo Duncan's benchmarking library for Clojure -- Criterium

Why Clojure over other JVM Lisps: Kawa, Armed Bear or SISC?

守給你的承諾、 提交于 2019-12-18 10:09:08
问题 The JVM already had three Lisps before Clojure arrived on the scene: Kawa, Armed Bear and SISC. What gap does Clojure fill that was left by those Lisps? 回答1: Kawa, ABCL, and SISC are reimplementations of existing languages that are quite long in the tooth. They are excellent if for some reason you want to use standard Scheme or standard Common Lisp on the JVM. Clojure is a new language. It doesn't fill a gap . It adds entirely new possibilities. It favors a purely functional approach- Scheme

Which Lisp should I learn? [closed]

南楼画角 提交于 2019-12-18 09:56:49
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 6 years ago . Which Lisp (dialect) should I learn, and why? The fragmentation between CL and Scheme slows uptake (at least for me!). So, give me the