logoalt Hacker News

WalterBrightyesterday at 8:53 PM1 replyview on HN

Here's how to do it in D:

    struct ListNode(T) {
        ListNode* next;
        T data;
    }

    T!int node;
Why suffer the C preprocessor? Using preprocessor macros is like using a hammer for finish carpentry, rather than a nail gun. A nail gun is 10x faster, drives the nail perfectly every time, and no half moon dents in your work.

Replies

dhooperyesterday at 8:55 PM

Thanks, this post is about C.

On some projects you must use C.

show 1 reply