Core.uninitialized gone?

Am I missing something obvious? The docs says Core.uninitialized exists but I can’t find it:

julia> uninitialized
ERROR: UndefVarError: uninitialized not defined

julia> Uninitialized
ERROR: UndefVarError: Uninitialized not defined

julia> versioninfo()
Julia Version 0.6.1
Commit 0d7248e (2017-10-24 22:15 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin14.5.0)
  CPU: Intel(R) Core(TM) i5-4258U CPU @ 2.40GHz
  LAPACK: libopenblas64_
  LIBM: libopenlibm
  LLVM: libLLVM-3.9.1 (ORCJIT, haswell)

julia> Core.
===                 DataType             Int64                Real                 TypedSlot            _expr                kwftype
@__doc__            DenseArray           Int8                 Ref                  Typeof               _new                 kwfunc
@_noinline_meta     DirectIndexString    Integer              SSAValue             TypeofBottom         applicable           nfields
@doc                DivideError          InterruptException   STDERR               UInt                 apply_type           nothing
@doc_str            DomainError          IntrinsicFunction    STDOUT               UInt128              arrayref             print
ANY                 ErrorException       Intrinsics           SegmentationFault    UInt16               arrayset             println
ARGS                Exception            LabelNode            Signed               UInt32               arraysize            setfield!
AbstractArray       Expr                 LineNumberNode       SimpleVector         UInt64               atdoc                show
AbstractFloat       Float16              Main                 Slot                 UInt8                atdoc!               sizeof
AbstractString      Float32              Method               SlotNumber           UndefRefError        cconvert             splicedexpr
Any                 Float64              MethodInstance       StackOverflowError   UndefVarError        convert              svec
AnyVector           Function             MethodTable          String               Union                eval                 throw
Array               GlobalRef            Module               Symbol               UnionAll             fieldtype            tuple
Bool                GotoNode             NTuple               Task                 Unsigned             getfield             typeassert
BoundsError         IO                   NewvarNode           Tuple                Vararg               getptls              typeof
Box                 InexactError         Number               Type                 VecElement           include              unsafe_convert
Builtin             Inference            OutOfMemoryError     TypeError            Void                 invoke               unsafe_write
Char                Int                  OverflowError        TypeMapEntry         WeakRef              io_pointer           write
CodeInfo            Int128               Ptr                  TypeMapLevel         _apply               isa
CoreSTDERR          Int16                QuoteNode            TypeName             _apply_latest        isdefined
CoreSTDOUT          Int32                ReadOnlyMemoryError  TypeVar              _apply_pure          issubtype

This doc is for master repo, not for 0.6.* releases. That’s why it is not exist.

It appears that allowing uninitialized data isn’t very popular according to this post

Is that why it’s been taken away?

I had thought the program could be faster without having to initialize an array with a default value since I will have to initialize it without something else anyways. Perhaps it isn’t a big difference…

You are looking at document for a version still under development. Current release (0.6.1) usually does not have all features of that version. 0.6 by default does not need uninitialized identifier. Just use array constructor like Array{SomeType,Dimension}(sizeof_array) for 0.6.* version.

1 Like

Uninitialized arrays are not being taken away – they’re just being required to be constructed more explicitly. You now have to pass uninitialized to the Array constructor to ask for it explicitly. Without the uninitialized the Array constructor will be reclaimed to construct an initialized array filled with value provided by iterating the argument. This conflicts with the current Array(n) and Array((m, n)) which construct uninitialized arrays. Hence the changes.

1 Like