Julia 0.6.0 ·¢²¼ÁË¡£JuliaÊÇÒ»¸öеĸßÐÔÄܶ¯Ì¬¸ß¼¶±à³ÌÓïÑÔ¡£Óï·¨ºÍÆäËû±à³ÌÓïÑÔÀàËÆ£¬Ò×ÓÚÆäËûÓïÑÔÓû§Ñ§Ï°¡£JuliaÓµÓзḻµÄº¯Êý¿â£¬ÌṩÁËÊý×Ö¾«¶È¡¢¾«ÖµÄÔö·ù Æ÷£¨sophisticated amplifier£©ºÍ·Ö²¼Ê½²¢ÐÐÔËÐз½Ê½¡£ºËÐĺ¯Êý¿âµÈ´ó¶àÊý¿âÊÇÓÉJulia±àд£¬µ«Ò²ÓóÉÊìµÄCºÍFORTRAN¿âÀ´´¦ÀíÏßÐÔ´úÊý¡¢Ëæ»úÊý²úÉúºÍ×Ö ·û´®´¦ÀíµÈÎÊÌâ¡£JuliaÓïÑԿɶ¨Ò庯Êý²¢ÇÒ¸ù¾ÝÓû§×Ô¶¨ÒåµÄ²ÎÊýÀàÐÍ×éºÏÔÙ½øÐÐÖØÔØ¡£
еÄÓïÑÔÌØÐÔ£º
New type system capabilities
Type parameter constraints can refer to previous parameters, e.g. type Foo{R<:Real, A<:AbstractArray{R}}. Can also be used in method definitions.
New syntax Array{T} where T<:Integer, indicating a union of types over all specified values of T (represented by a UnionAll type). This provides behavior similar to parametric methods or typealias, but can be used anywhere a type is accepted. This syntax can also be used in method definitions, e.g. function inv(M::Matrix{T}) where T<:AbstractFloat. Anonymous functions can have type parameters via the syntax ((x::Array{T}) where T<:Real) -> 2x.
Implicit type parameters, e.g. Vector{<:Real} is equivalent to Vector{T} where T<:Real, and similarly for Vector{>:Int}
Much more accurate subtype and type intersection algorithms. Method sorting and identification of equivalent and ambiguous methods are improved as a result.
ÓïÑԱ仯£º
"Inner constructor" syntax for parametric types is deprecated. For example, in this definition:[code]type Foo{T,S<:Real}
x
Foo(x) = new(x)
end[/code]the syntax Foo(x) = new(x) actually defined a constructor for Foo{T,S}, i.e. the case where the type parameters are specified. For clarity, this definition now must be written as Foo{T,S}(x) where {T,S<:Real} = new(x)
The keywords used to define types have changed
In 0.6, immutable and type are still allowed as synonyms without a deprecation warning.
immutable changes to struct
type changes to mutable struct
abstract changes to abstract type ... end
bitstype 32 Char changes to primitive type Char 32 end
Èí¼þÏêÇ飺https://github.com/JuliaLang/julia/blob/release-0.6/NEWS.md
ÏÂÔØµØÖ·£ºhttps://github.com/JuliaLang/julia/archive/v0.6.0.zip
À´×Ô:¿ªÔ´ÖйúÉçÇø

