What's new?

* Performance improvements
* New UDAs for networking packets for even less required boilerplate

The first new thing is self-explanatory. The second one is explained briefly in this blog post:

(also on HN but you know how that goes)

The summary is you can now write this:

    struct UdpPacket {
        static struct Header {
            ushort srcPort;
            ushort dstPort;
            ushort length;
            ushort checksum;

        enum headerSize = unalignedSizeof!Header;
        alias header this;

        Header header;
        @LengthInBytes("length - headerSize") ubyte[] data;

Code? Who needs code when the compiler can write it for you?


Reply via email to