Clojure 1.6 正式版发布,并发编程语言

发布于 2014年03月26日
收藏 17

Clojure 1.6 正式版发布,此版本更新内容如下:

1 兼容性和依赖关系

1.1 JDK 版本更新

Clojure now builds with Java SE 1.6 and emits bytecode requiring Java SE 1.6 instead of Java SE 1.5. [CLJ-1268]

1.2 ASM 库更新

The embedded version of the ASM bytecode library has been upgraded to ASM 4.1. [CLJ-713]

1.3 提升 "Alpha" 特性

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.1 Java API

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

2.5 bitops

2.6 clojure.test

3 功能增强

3.1 Printing

  • 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.

3.2 错误信息

  • 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.

3.3 文档字符串

  • 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

3.4 性能

  • CLJ-858Improve speed of STM by removing System.currentTimeMillis.

  • use java.nio for Files

  • commitReduce overhead of protocol callsites by removing unneeded generated cache fields.

3.5 其他改进

  • 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

4 Bug 修复

  • 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 flush but not close stdout so errors can be reported.

  • CLJ-1161Remove bad 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.

  • 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


转载请注明:文章转载自 OSCHINA 社区 []
本文标题:Clojure 1.6 正式版发布,并发编程语言




i want to say i like clojure