comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Ada.Strings.Unbounded vs Ada.Containers.Indefinite_Holders
Date: Sat, 23 Sep 2017 10:09:55 +0200
Date: 2017-09-23T10:09:55+02:00	[thread overview]
Message-ID: <oq54sk$1uf3$1@gioia.aioe.org> (raw)
In-Reply-To: oq421f$fkf$1@gioia.aioe.org

On 2017-09-23 00:15, Victor Porton wrote:
> Simon Wright wrote:
> 
>> Victor Porton <porton@narod.ru> writes:
>>
>>> What is 2.5(6)? There is no (6) in RM 2.5.
>>
>> 2.6(6):
>>
>>      A null string literal is a string_literal with no string_elements
>>      between the quotation marks.
> 
> In my opinion, it would be better to change RM phrasing from "null string"
> to "empty string", because in some other languages (notably C) NULL means
> something other. It is just confusing.

The adjective null and the noun null are distinct parts of speech. C's 
noun null is an abbreviation of null pointer. If pointers can be null so 
strings can.

Wouldn't it be silly to change, say, mathematical group theory with its 
null group elements because C (and Ada too) have null pointers called nulls?

BTW, empty is string is indeed a null element for the concatenation 
operation &:

    forall X in String   X & "" = X

So, using the null adjective is absolutely justified.

A null string is a bit more than just empty string. (:-))

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de

  reply	other threads:[~2017-09-23  8:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-21 18:14 Ada.Strings.Unbounded vs Ada.Containers.Indefinite_Holders Victor Porton
2017-09-21 21:30 ` AdaMagica
2017-09-22 12:16   ` Victor Porton
2017-09-22 19:25     ` Simon Wright
2017-09-22 22:15       ` Victor Porton
2017-09-23  8:09         ` Dmitry A. Kazakov [this message]
2017-09-23  9:16           ` Jeffrey R. Carter
2017-10-03  0:15             ` Randy Brukardt
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox