Sujet : Re: question about linker
De : bc (at) *nospam* freeuk.com (Bart)
Groupes : comp.lang.cDate : 06. Dec 2024, 20:27:42
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vivj7d$2gvqj$2@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
User-Agent : Mozilla Thunderbird
On 06/12/2024 19:14, Ike Naar wrote:
On 2024-12-06, Bart <bc@freeuk.com> wrote:
My language:
>
println =a,=b # 13 characters, 0 shifted
>
(And that space is optional!) In C (assume the existence of stdio.h):
>
printf("A=%lld B=%f\n",a,b); # ~28 characters, 8 shifted
>
Enough said.
Looks like a cherry-picked example.
How would this (slightly modified) C statement be notated in your language:
printf("a:%lld b:%g\n",a,b);
You mean, with those lower-case labels? Then I'd have to write it like this:
fprintln "a:# b:#", a, b:"g"
But I picked on Print because that is the most common temporary statement I use; it is written hundreds of times for debugging, but rarely persists.
Then you rarely bother with formatting. With C however, all the T's and I's need to be crossed and dotted, even if the line will be deleted a minute later. A LOT of fiddly typing. Plus needing to be constantly aware of the exact types of the the things being printed.