掃二維碼與項(xiàng)目經(jīng)理溝通
我們?cè)谖⑿派?4小時(shí)期待你的聲音
解答本文疑問/技術(shù)咨詢/運(yùn)營(yíng)咨詢/技術(shù)建議/互聯(lián)網(wǎng)交流
Lisp 是一種編程語(yǔ)言,以表達(dá)性和功能強(qiáng)大著稱,但人們通常認(rèn)為它不太適合應(yīng)用于一般情況。Clojure 是一種運(yùn)行在 Java? 平臺(tái)上的 Lisp 方言,它的出現(xiàn)徹底改變了這一現(xiàn)狀。如今,在任何具備 Java 虛擬機(jī)的地方,您都可以利用 Lisp 的強(qiáng)大功能。

荷塘網(wǎng)站建設(shè)公司成都創(chuàng)新互聯(lián),荷塘網(wǎng)站設(shè)計(jì)制作,有大型網(wǎng)站制作公司豐富經(jīng)驗(yàn)。已為荷塘上1000家提供企業(yè)網(wǎng)站建設(shè)服務(wù)。企業(yè)網(wǎng)站搭建\外貿(mào)網(wǎng)站建設(shè)要多少錢,請(qǐng)找那個(gè)售后服務(wù)好的荷塘做網(wǎng)站的公司定做!
作為當(dāng)今最主流的運(yùn)算平臺(tái)JVM,把函數(shù)式編程語(yǔ)言引入JVM也是很多人嘗試的方向,Clojure就是其中之一。Clojure是一個(gè)在JVM平臺(tái)運(yùn)行的動(dòng)態(tài)函數(shù)式編程語(yǔ)言,其語(yǔ)法接近于LISP語(yǔ)言,在JVM平臺(tái)運(yùn)行的時(shí)候,會(huì)被編譯為JVM的字節(jié)碼進(jìn)行運(yùn)算。
Clojure保持了函數(shù)式語(yǔ)言的主要特點(diǎn),例如immutable state,F(xiàn)ull Lisp-style macro support,persistent data structures等等,并且還能夠非常方便的調(diào)用Java類庫(kù)的API,和Java類庫(kù)進(jìn)行良好的整合。
Clojure 1.6 正式版發(fā)布,下載地址:http://clojure.org/downloads
此版本更新內(nèi)容如下:
1 兼容性和依賴關(guān)系
Clojure now builds with Java SE 1.6 and emits bytecode requiring Java SE 1.6 instead of Java SE 1.5. [CLJ-1268]
The embedded version of the ASM bytecode library has been upgraded to ASM 4.1. [CLJ-713]
The following features are no longer marked Alpha in Clojure:
Watches - add-watch, remove-watch
Transients - transient, persistent!, conj!, assoc!, dissoc!, pop!, disj!
Exception data - ex-info, ex-data
Promises - promise, deliver
Records - defrecord
Types - deftype
Pretty-print tables - print-table
2.2 Map destructuring extended to support namespaced keys
2.3 New "some" operations
2.4 Hashing
Related tickets for dev and regressions:
CLJ-1328Make several Clojure tests independent of ordering
CLJ-1331Update primitive vectors to use Murmur3 hash
CLJ-1335Update hash for empty PersistentList and LazySeq
CLJ-1336Make hashing mixing functions available in Clojure
CLJ-1338Make Murmur3 class public
CLJ-1344Update mapHasheq to call Murmur3 algorithm
CLJ-1348Add hash-ordered-coll and hash-unordered-coll
CLJ-1355Restore cached hashCode for Symbol and (uncached) hashCode for Keyword
CLJ-1365Add type hints for new collection hash functions
CLJ-827 - unsigned-bit-shift-right
2.6 clojure.test
CLJ-866 - test-vars
CLJ-1352 - fix regression in CLJ-866
CLJ-908Print metadata for functions when print-meta is true and remove errant space at beginning.
CLJ-937pprint cl-format now supports E, F, and G formats for ratios.
CLJ-1248Include type information in reflection warning messages
CLJ-1099If non-seq passed where seq is needed, error message now is an ExceptionInfo with the instance value, retrievable via ex-data.
CLJ-1083Fix error message reporting for "munged" function names (like a->b).
CLJ-1056Handle more cases and improve error message for errors in defprotocol definitions.
CLJ-1102Better handling of exceptions with empty stack traces.
CLJ-939Exceptions thrown in the top level ns form are reported without file or line number.
CLJ-1164Fix typos in clojure.instant/validated and other internal instant functions.
CLJ-1143Correct doc string for ns macro.
CLJ-196Clarify value of file is undefined in the REPL.
CLJ-1228Fix a number of spelling errors in namespace and doc strings.
CLJ-835Update defmulti doc to clarify expectations for hierarchy argument.
CLJ-1304Fix minor typos in documentation and comments
CLJ-1302Mention that keys and vals order are consistent with seq order
CLJ-858Improve speed of STM by removing System.currentTimeMillis.
CLJ-669clojure.java.io/do-copy: use java.nio for Files
commitReduce overhead of protocol callsites by removing unneeded generated cache fields.
CLJ-908Make default-data-reader-fn set!-able in REPL, similar to data-readers.
CLJ-783Make clojure.inspector/inspect-tree work on sets.
CLJ-896Make browse-url aware of xdg-open.
CLJ-1160Fix clojure.core.reducers/mapcat does not stop on reduced? values.
CLJ-1121-> and ->> have been rewritten to work with a broader set of macros.
CLJ-1105clojure.walk now supports records.
CLJ-949Removed all unnecessary cases of sneakyThrow.
CLJ-1238Allow EdnReader to read foo// (matches LispReader behavior).
CLJ-1264Remove uses of _ as a var in the Java code (causes warning in Java 8).
CLJ-394Add record? predicate.
CLJ-1200ArraySeq dead code cleanup, ArraySeq_short support added.
CLJ-1331Primitive vectors should implement hasheq and use new hash algorithm
CLJ-1354Make APersistentVector.SubVector public so other collections can access
CLJ-1353Make awt run headless during the build process
CLJ-1018Make range consistently return infinite sequence of start with a step of 0.
CLJ-863Make interleave return () on 0 args and identity on 1 args.
CLJ-1072Update internal usages of the old metadata reader syntax to new syntax.
CLJ-1193Make bigint and biginteger functions work on double values outside long range.
CLJ-1154Make Compile.java flush but not close stdout so errors can be reported.
CLJ-1161Remove bad version.properties from sources jar.
CLJ-1175Fix invalid behavior of Delay/deref if an exception is thrown - exception will now be rethrown on subsequent calls and not enter a corrupted state.
CLJ-1171Fix several issues with instance? to make it consistent when used with apply.
CLJ-1202Protocol fns with dashes may get incorrectly compiled into field accesses.
CLJ-850Add check to emit invokePrim with return type of double or long if type-hinted.
CLJ-1177clojure.java.io URL to File coercion corrupts path containing UTF-8 characters.
CLJ-1234Accept whitespace in Record and Type reader forms (similar to data literals).
CLJ-1233Allow ** as a valid symbol name without triggering dynamic warnings.
CLJ-1246Add support to clojure.reflect for classes with annotations.
CLJ-1184Evaling #{do ...} or [do ...] is treated as do special form.
CLJ-1090Indirect function calls through Var instances fail to clear locals.
CLJ-1076pprint tests fail on Windows, expecting \n.
CLJ-766Make into-array work consistently with short-array and byte-array on bigger types.
CLJ-1285Data structure invariants are violated after persistent operations when collision node created by transients.
CLJ-1222Multiplication overflow issues around Long/MIN_VALUE
CLJ-1118Inconsistent numeric comparison semantics between BigDecimals and other numerics
CLJ-1125Clojure can leak memory in a servlet container when using dynamic bindings or STM transactions.
CLJ-1082Subvecs of primitve vectors cannot be reduced
CLJ-1301Case expressions use a mixture of hashCode and hasheq, potentially leading to missed case matches when these differ.
CLJ-983proxy-super does not restore original binding if call throws exception
CLJ-1176clojure.repl/source errors when read-eval bound to :unknown
CLJ-935clojure.string/trim uses different definition of whitespace than triml and trimr
CLJ-1058StackOverflowError on exception in reducef for PersistentHashMap fold
CLJ-1328Fix some tests in the Clojure test suite to make their names unique and independent of hashing order
CLJ-1339Empty primitive vectors throw NPE on .equals with non-vector sequential types
CLJ-1363Field access via .- in reflective case does not work
CLJ-944Compiler gives constant collections types which mismatch their runtime values
CLJ-1387reduce-kv on large hash maps ignores reduced result
更多更新信息請(qǐng)看發(fā)行說明。

我們?cè)谖⑿派?4小時(shí)期待你的聲音
解答本文疑問/技術(shù)咨詢/運(yùn)營(yíng)咨詢/技術(shù)建議/互聯(lián)網(wǎng)交流