🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.arch
Article #19

Re: Optimization by programmers

#19
From: EricP
Date: Wed, 07 Oct 2026 20:49
11 lines
1579 bytes
On 2026-Oct-07 15:25, Michael S wrote:
> https://doc.rust-lang.org/book/ch03-02-data-types.html?highlight=array#invalid-array-element-access

Does Rust allow zero length arrays, vectors, strings and slices?
Ada calls these a null slice.
In DEC Fortran 77 a zero length slice was a bounds check error,
which was really irritating because in string manipulation they happen a lot.
If so, how does one specify a null slice in Rust?
I couldn't find any definition in that doc.

Technical Details
Message-ID: <QfyxS.548$cMed.68@fx10.iad>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!feeder.usenetexpress.com!tr3.iad1.usenetexpress.com!news-out.netnews.com!s1-3.netnews.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx10.iad.POSTED!not-for-mail
References: <1177fdi$26ea4$1@dont-email.me> <86bj9hr91x.fsf@linuxsc.com> <119dne7$2baig$1@dont-email.me> <86h5j5pky9.fsf@linuxsc.com> <11a024r$f52$1@reader2.panix.com> <20261007222539.000033d0@yahoo.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!feeder.usenetexpress.com!tr3.iad1.usenetexpress.com!news-out.netnews.com!s1-3.netnews.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx10.iad.POSTED!not-for-mail
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: Optimization by programmers
Newsgroups: comp.arch
References: <1177fdi$26ea4$1@dont-email.me> <86bj9hr91x.fsf@linuxsc.com> <119dne7$2baig$1@dont-email.me> <86h5j5pky9.fsf@linuxsc.com> <11a024r$f52$1@reader2.panix.com> <20261007222539.000033d0@yahoo.com>
Content-Language: en-CA
From: EricP <ThatWouldBeTelling@thevillage.com>
In-Reply-To: <20261007222539.000033d0@yahoo.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 11
Message-ID: <QfyxS.548$cMed.68@fx10.iad>
X-Complaints-To: abuse@UsenetServer.com
NNTP-Posting-Date: Wed, 07 Oct 2026 20:49:52 UTC
Date: Wed, 7 Oct 2026 16:49:52 -0400
X-Received-Bytes: 1261