# Discussion on "Why I no longer recommend Julia" by Yuri Vishnevsky

**URL:** <https://discourse.julialang.org/t/discussion-on-why-i-no-longer-recommend-julia-by-yuri-vishnevsky/81151>\
**Category:** Community\
**Tags:** discussion\
**Created:** [May 16, 2022, 2:33pm UTC](https://discourse.julialang.org/t/discussion-on-why-i-no-longer-recommend-julia-by-yuri-vishnevsky/81151 "2022-05-16T14:33:38Z")\
**Posts on this page:** 1\
**Showing post:** 14

<div class="post-metadata">

**Author:** ![mkitti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkitti/32/12459_2.png) [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Post date:** [May 16, 2022, 4:03pm UTC](https://discourse.julialang.org/t/discussion-on-why-i-no-longer-recommend-julia-by-yuri-vishnevsky/81151/14 "2022-05-16T16:03:23Z")

</div>

> [@roland-KA](#):
>
> I don‘t understand the problem. There are checks on the length of both arrays a few lines above that code.

The problem is it assumes the valid indices are `1:length(a)`. This cannot be assumed for an arbitrary `AbstractArray`:

```julia
julia> using OffsetArrays

julia> A = OffsetArray(1:10, -2)
1:10 with indices -1:8

julia> A[length(A)]
ERROR: BoundsError: attempt to access 10-element OffsetArray(::UnitRange{Int64}, -1:8) with eltype Int64 with indices -1:8 at index [10]
Stacktrace:
 [1] throw_boundserror(A::OffsetVector{Int64, UnitRange{Int64}}, I::Tuple{Int64})
   @ Base .\abstractarray.jl:691
 [2] checkbounds
   @ .\abstractarray.jl:656 [inlined]
 [3] getindex(A::OffsetVector{Int64, UnitRange{Int64}}, i::Int64)
   @ OffsetArrays C:\Users\kittisopikulm\.julia\packages\OffsetArrays\N7ji6\src\OffsetArrays.jl:428
 [4] top-level scope
   @ REPL[100]:1

```

---

_[View the full topic](https://discourse.julialang.org/t/discussion-on-why-i-no-longer-recommend-julia-by-yuri-vishnevsky/81151)._
