Re: Code Comprehension
- From: Martin Eisenberg <martin.eisenberg@xxxxxxx>
- Date: Mon, 28 Aug 2006 17:54:16 +0000 (UTC)
Chris Uppal wrote:
Pascal Bourguignon wrote:
When you have characters, use '\0' which explictely says Hello!
I'm a character.
Not really following on from that, but this is a convenient
point to raise an issue which interests me, and which we seem to
be skirting around without ever quite touching explicitly.
Very nice post!
Another downside of the "idealised" approach is that it risks
forbidding (some) idiomatic use of the language. As in the
running example, it would not allow:
if (!a || !b)
return;
but would insist on a more verbose re-writing.
Depends on how one idealizes. Instead of pretending that ! works only
with truth values one might construe it as the predicate 'holds-
nothing' on a category 'Value-or-nothing' (idealization of pointer
types) and write that code thinking, "if either of a, b holds no
string then return". But while this is arguably closer to the real
semantics the problems you raised with imagined semantics probably
still apply.
Martin
--
Quidquid latine scriptum sit, altum viditur.
.
- References:
- Code Comprehension
- From: jj
- Re: Code Comprehension
- From: Pascal Bourguignon
- Re: Code Comprehension
- From: Logan Shaw
- Re: Code Comprehension
- From: Pascal Bourguignon
- Re: Code Comprehension
- From: Logan Shaw
- Re: Code Comprehension
- From: Rob Thorpe
- Re: Code Comprehension
- From: Pascal Bourguignon
- Re: Code Comprehension
- From: Phlip
- Re: Code Comprehension
- From: Pascal Bourguignon
- Re: Code Comprehension
- From: Pascal Bourguignon
- Re: Code Comprehension
- From: Chris Uppal
- Code Comprehension
- Prev by Date: Re: generated function
- Next by Date: Re: Linked list problem (puzzle)
- Previous by thread: Re: Code Comprehension
- Next by thread: Re: Code Comprehension
- Index(es):