2 ms·
I may be misremembering, but I saw a 'C' strcpy that looked concise and elegant, and seemed like a kind of poetry to me at the time. while(*s1++ = *s2++);
by MrVandemar 2y ago
I may be misremembering, but I saw a 'C' strcpy that looked concise and elegant, and seemed like a kind of poetry to me at the time.
while(*s1++ = *s2++);
- saghm 2y agoIt's certainly concise, but two post-evaluation assignments inside another assignment evaluated as a boolean condition feels more like the code equivalent of an Lovecraftian eldritch horror than a beautiful sunset.
- ajuc 2y agoThis is code golf, not algorithmic beauty tho. I'd say it's like a limeric - short and witty, but not deeply moving. But I admit I also remember this :)