The D Programming Language

Karl Heuer karl at haddock.ISC.COM
Fri Mar 4 05:25:02 AEST 1988


In article <7395 at brl-smoke.ARPA> gwyn at brl.arpa (Doug Gwyn) writes:
>In article <2809 at haddock.ISC.COM> karl at haddock.ima.isc.com (Karl Heuer) writes:
>>Yes, let's make *all* statements return values ...
>
>I once designed a language like this for a special purpose.  It worked, but
>you need to figure out what to do about declarations.  What values should
>they return?

When in doubt, make it a void expression.  Personally, I think even strcpy()
should be void.

Alternately, if only one object can be declared per statement, it could return
that object (if it was initialized) or its address (assuming it has one).

Karl W. Z. Heuer (ima!haddock!karl or karl at haddock.isc.com), The Walking Lint



More information about the Comp.lang.c mailing list