[kwlug-disc] Programming Insights

Mikalai Birukou mb at 3nsoft.com
Tue Feb 20 12:45:40 EST 2018


Rust off-by-one's.

Recently noticed a wisdom in Rust api: copy_from_slice in 
x[a..b].copy_from_slice(&y[c..d]) requires equal lengths on *both* 
sides, unlike C (memcopy), unlike JavaScript (TypedArray.set()).

I have hope :)


On 2018-02-20 01:19 AM, John Johnson wrote:
> I saw this in a newsletter.
>
> There are only two really difficult things in programming:
>
> * Naming
> * Cache invalidation
> * Off-by-one errors
>
> JohnJ
>
>
> _______________________________________________
> kwlug-disc mailing list
> kwlug-disc at kwlug.org
> http://kwlug.org/mailman/listinfo/kwlug-disc_kwlug.org
>





More information about the kwlug-disc mailing list