1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317
|
Changed to Clojure from 1.2 to 1.2.1
* keyword map uses weak refs, reduces strain on permgen
* fixes genclass namespace munging CLJ-432
* fix stack overflow in Keyword.intern CLJ-444
* detect and report cyclic load CLJ-8
Changes to Clojure in Version 1.2
= CONTENTS =
0 Changes from beta up to 1.2
0.0 Clojure 1.2 is Clojure 1.2 RC3
0.1 Changes from RC2 to RC3
0.2 Changes from RC1 to RC2
0.3 Changes from beta1 to RC1
1 Deprecated and Removed Features
1.1 metadata reader macro is now ^
2 New/Improved Features in clojure.core
2.1 Protocols, Records, and Types
2.2 Sequence Library
2.3 Destructuring
2.4 Case
2.5 Duplicate Key Prevention
2.6 Primitive Vectors
2.7 Agent Error Handling
2.8 Improved Ratio Support
2.9 Macro Implicit Args
2.10 Multimethod Enhancements
2.11 Function Metadata (Alpha)
2.12 Java Annotations
2.13 Namespace Collision Warnings
3 New Namespaces
3.1 clojure.java.io
3.1 clojure.java.javadoc
3.3 clojure.java.shell
3.4 clojure.pprint
3.5 clojure.repl
3.6 clojure.string
4 Functions with Improved Performance
5 Bug Fixes
= 0 Changes from beta1 -> RC1 -> RC2
= 0.0 Clojure 1.2 is the same code as Clojure RC3
* only change is build metadata and changes.txt
= 0.1 Changes from RC2 to RC3
* #382 underive fixed
* #423 future now clears closed-over variables, allowing gc
* #404 clojure.java.io: reader and writer work correctly for sockets
* #422 fixed corner case in finally blocks where code could execute twice
= 0.2 Changes from RC1 to RC2
Record/map equality is now symmetric in all cases. There are two
variants:
* In most cases, you should use =. Calls to = include type
information, so instances of different record types can never be =
to each other, or to plain maps.
* Calls to .equals are different. They respect the Java semantics
for maps, which is a requirement for correct interop. Type
information is *not* included, so any kind of map can be .equals
to any other.
Possible impacts for your programs:
* If you create a custom implementation of Clojure's IPersistentMap,
you probably want it to be able to be = to other maps. If so, all
you need to do is implement the marker interface
clojure.lang.MapEquivalence. Note that APersistentMap does this
for you.
= 0.3 Changes from beta1 to RC1 =
* switch to soft refs for class and keyword cache
* update reify, defprotocol, extend-protocol docstrings (#340)
* fix fieldless defrecord corner case (#402)
* sh reads stdout and stderr in parallel
* sh stdin, stdout default to UTF-8 (#413)
* gen-class checks validity of method names (#407)
= 1 Deprecated and Removed Features =
== 1.1 metadata reader macro is now ^ ==
^ is the metadata reader macro. The former syntax #^ is deprecated and
will be removed in a future version of Clojure.
= 2 New Features in clojure.core =
== 2.1 Protocols, Records, Reify, and Types ==
defprotocol provides polymorphism without type intrusion.
defrecord, reify, and deftype provide datatypes. They support, in a
relatively clean manner, access to the highest-performance primitive
representation and polymorphism mechanisms of the host.
See http://clojure.org/protocols and http://clojure.org/datatypes for
a more complete description.
== 2.2 Sequence Library ==
The sequence library has several new functions in Clojure 1.2. The
notes in parentheses indicate differences from the similarly-named
functions in clojure-contrib.
* flatten - New
* frequencies - New
* group-by - New (note: unsorted)
* keep - New
* keep-indexed - New (preferred over contrib's indexed for perf)
* map-indexed - New (preferred over contrib's indexed for perf)
* partition-all - New
* partition-by - New
* rand-nth - New (name indicates dependency on nth's perf)
* range - Improved (added zero arity)
* reductions - New
* repeatedly - Improved! (added "do n times" semantics)
* shuffle - New
== 2.3 Destructuring Enhanced ==
If you associatively destructure a seq, it will be poured into a map first:
(defn foo [& {:keys [a b c]}]
[a b c])
(foo :c 3 :b 2)
=> [nil 2 3]
== 2.4 Case ==
Case provides constant time dispatch on its clauses, which can be any
compile-time literal
(defn release-status
[version]
(case version
(0.9 1.0 1.1) "History"
1.2 "Right now"
:sentient "RSN"
"The default"))
The string "The default" represents the default clause and can be any
expression, not only a compile-time literal.
== 2.5 Duplicate Key Prevention ==
Associative literals and their constructor functions hash-map and
hash-set now prevent duplicate keys:
#{1 1}
=> java.lang.IllegalArgumentException: Duplicate key: 1
== 2.6 Primitive Vectors ==
vector-of creates a vector of unboxed Java primitives, which follows
the contract of Clojure vectors. It takes one keyword argument
corresponding to its primitive type that can be any of :int, :long,
:float, :double, :byte, :short, :boolean, or :char.
== 2.7 Agent Error Handling ==
Agent error handling has been reworked in Clojure 1.2.
* agent-error - New
* restart-agent - New
* set-error-handler - New
* error-handler - New
* set-error-mode! - New
* error-mode - New
* await - improved docstring, explains failed agent semantics
* agent-errors - DEPRECATED
* clear-agent-errors - DEPRECATED
== 2.8 Improved Ratio Support ==
* numerator - New
* denominator - New
* bigint - Enhanced, now ratio aware
== 2.9 Macro Implicit Args ==
Macros now have access to implicit arguments:
* &form - the macro form
* &env - the local bindings
== 2.10 Multimethod Enhancements ==
Multimethods have been enhanced to improve interactive development:
* remove-all-methods - New
* defmulti - Enhanced to have defonce semantics
== 2.11 Function Metadata ==
Clojure functions can now have metadata. Please treat this capability
as alpha and subject to possible change or removal in a future version
of Clojure.
== 2.12 Java Annotations ==
Java Annotations can be added simply by making a Java annotation
class a key in a Clojure metadata map:
;; Name is deprecated
(defrecord ^{Deprecated true} Name [first last])
Please use Java annotations for interop purposes only.
== 2.13 Namespace Collision Warnings ==
If a namespace defines a Var whose name collides with a name in the
clojure.core namespace, you will see a warning but the definition will
be allowed to proceed. This facilitates promoting useful functions
into clojure.core without causing a breaking change.
Please track down and fix these warnings, as matching names do not
always imply matching semantics!
= 3 New Namespaces =
Complete documentation for all namespaces is in the source and API
docs: http://clojure.github.com/clojure/
== 3.1 clojure.java.io ==
Java I/O libraries distilled from the duck-streams and io namespaces
in clojure-contrib.
== 3.2 clojure.java.javadoc ==
Launch a Javadoc browser from the REPL, promoted from the javadoc and
repl-util namespace in clojure-contrib.
== 3.3 clojure.java.shell ==
Utilities for launching a subprocess, promoted from shell-out
namespace in clojure-contrib.
== 3.4 clojure.pprint ==
Pretty-printer for Clojure, promoted from pprint in clojure-contrib.
== 3.5 clojure.repl ==
Utilities for a more pleasant REPL experience, promoted from the
repl-utils and ns-utils namespaces in clojure-contrib.
== 3.6 clojure.string ==
String utilities promoted from the str-utils, str-utils2, str-utils3,
and string namespaces in clojure-contrib.
= 4 Performance Enhancements =
Many functions have improved performance in Clojure 1.2:
aget
array-map
aset
bit-shift-left
bit-shift-right
boolean
byte
count
double
false?
float
future-call
get
into
keyword
line-seq
long
nil?
nth
promise
re-seq
reduce
resultset-seq
set
short
true?
vector
= 5 Bug Fixes =
Please see the complete list at
https://www.assembla.com/spaces/ticket_reports/show/13167?space_id=clojure.
|