From mboxrd@z Thu Jan 1 00:00:00 1970 To: 9fans@cse.psu.edu Date: Fri, 15 Sep 2000 08:47:19 +0000 From: "Douglas A. Gwyn" Message-ID: <39C0DC0F.F5ECF968@arl.army.mil> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit References: <200009131811.TAA15840@whitecrow.demon.co.uk>, <002301c01e48$24674480$89c584c3@cybercable.fr> Subject: Re: [9fans] no const? Topicbox-Message-UUID: 07f078b8-eac9-11e9-9e20-41e7f4b1d025 Boyd Roberts wrote: > if you really wanna smash memory 'const' will not save you; > say you malloc the arg to strlen. later on (not in strlen) you could > smash it. If the malloced pointer is stored in a properly declared variable, then subsequent attempts to modify the pointed-to storage result in a diagnostic. Since the actual dynamic storage is not inherently read-only, that is the best that one could hope for from the language. > > It's easy to complain about what others do, but also pointless. > really? criticism serves no purpose? nonsense. No, complaining serves no purpose. Critiquing can be useful if the analysis uncovers some interesting principles or facts.