Deutsch   English   Français   Italiano  
<lcrj10Fef9rU1@mid.individual.net>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: rbowman <bowman@montana.com>
Newsgroups: comp.os.linux.advocacy
Subject: Re: More Funny Stuff From Joel
Date: 11 Jun 2024 18:23:28 GMT
Lines: 11
Message-ID: <lcrj10Fef9rU1@mid.individual.net>
References: <17d716103c089ab3$7951$675878$802601b3@news.usenetexpress.com>
	<ej496jd0tb59u2l0nqtghq3u9ahhmann3s@4ax.com>
	<lcjnnuF896hU5@mid.individual.net>
	<kma96j1no1tp926ctejldkdk2c19aeruft@4ax.com>
	<lcjvk1F9n7aU1@mid.individual.net>
	<2ej96j1mbvgiok4q5c57vdlo94itpfu5dt@4ax.com>
	<6664e989$0$2363151$882e4bbb@reader.netnews.com>
	<slrnv6f9fl.2hg.candycanearter07@candydeb.host.invalid>
	<lcq27iF6su7U4@mid.individual.net>
	<slrnv6flo3.7fn.candycanearter07@candydeb.host.invalid>
	<lcqaljF8hrcU1@mid.individual.net> <v49f1b$11kek$3@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: individual.net ZSFBzJDDDpLM2LG3bLX59wjpOO+ETVK8B/PbcLH06JHdJrfGnU
Cancel-Lock: sha1:jiVhG0pYqcTehz/1iA8W5wXbRZM= sha256:p4PoJivn/FTGDy/4E6fuHvp8Mu+GXSCw541GeAdCbCM=
User-Agent: Pan/0.149 (Bellevue; 4c157ba)
Bytes: 1709

On Tue, 11 Jun 2024 08:13:31 -0400, Chris Ahlstrom wrote:

> const is used to enforce certain semantics. Of course, it is not
> necessary for a simple C function parameter (e.g. an int) to be const
> unless one is pedantic.

I can't cook up a simple example but I've hit instances using functions in 
legacy code where one const in a function resulted in having to spread 
const around to keep the compiler from whining. It's like the situations 
where you use const-cast in C++ to get things to play nice.