julelang / jule

Effective programming language to build efficient, fast, reliable and safe software while maintaining simplicity
https://jule.dev
BSD 3-Clause "New" or "Revised" License
133 stars 13 forks source link

fix: cast indicies to `std::size_t` in `Array` #82

Closed vil02 closed 9 months ago

vil02 commented 9 months ago

Description

~In this PR I suggest to use std::size_t as the size of the Array. The advantage is that it avoids sign conversions and it seems to simplify the logic.~ In order to avoid sign conversions I suggest to cast indices to std::size_t.

Checklist

Screenshots (if any)

Note to reviewers

~Use std::size_t as the size of Array.~ Cast indices to std::size_t in Array.