Thread overview
[SAOC 2023] dfmt rewrite - Weekly update #17
Jan 13
zjh
January 12

Hi all,

This update marks the end of SAOC 2023. Across the course of this program, I worked on building a formatter akin to dfmt using the DMD frontend, and I must say I'm quite satisfied with the outcome. We've mostly managed to reproduce the original source code, formatted in a consistent manner. There are a few bugs in the implementation, and support for retaining comments is a work in progress (with a PR up in DMD too), but overall I would say the project has achieved what was intended - to design and implement a formatter which uses the same source of truth as the compiler in terms of language syntax and semantics.

Going forward, I'll be working on sorting out the smaller details and hopefully have dmdfmt integrated into the default set of packages for D soon. A big shoutout to everyone who supported me along the way - notably Razvan Nitu (my mentor), and also Jan Juritza, Max Haughton, and Andrew Cattermole.

I hope to share the finished project here soon, and until then, cheerio!

January 12

On Friday, 12 January 2024 at 16:22:57 UTC, Prajwal S N wrote:

>

Hi all,

This update marks the end of SAOC 2023. Across the course of this program, I worked on building a formatter akin to dfmt using the DMD frontend, and I must say I'm quite satisfied with the outcome. We've mostly managed to reproduce the original source code, formatted in a consistent manner. There are a few bugs in the implementation, and support for retaining comments is a work in progress (with a PR up in DMD too), but overall I would say the project has achieved what was intended - to design and implement a formatter which uses the same source of truth as the compiler in terms of language syntax and semantics.

[...]

Great Job done brother!

January 13
Very good work!
January 13

On Friday, 12 January 2024 at 16:22:57 UTC, Prajwal S N wrote:

>

Hi all,

Nice.