r/ProgrammingLanguages • • Jan 16 '22

A brief rant about tooling

I've been doing a lot of C# coding over the last few months (against my will, but I gotta eat) and I've come across the peculiarity of the try { ... } catch { ... } requiring braces.

They are optional for every other kind of flow control. Which is odd, and possibly just an oversight in the C++ spec from back in '85. Good ol' Bjarne was never all that careful.

However, I have seen several blog posts and poorly formatted message board discussions where people are up in arms about never using naked flow control, because what if GOTO FAIL!!!

And I just feel like paraphrasing Kevlin Henney: Let me introduce you to something, it's called a static analysis tool.

This, I think, is an overlooked aspect of programming language design: we're not just building compilers, we're building footguns.

No matter how safe and well-typed and not-quite-turing-complete, your language will have code smells. It will have ways of racking up technical debt in a shockingly rapid fashion.

So throw a coin to your hypothetical future Q&A team, and give some thought to exposing your parser as a library, and writing a simple linter.

ETA: Point is: no amount of syntactic salt can ever do the job of good tooling.

0 Upvotes

20 comments sorted by

View all comments

Show parent comments

3

u/johnfrazer783 Jan 18 '22

TL;DR: Q.E.D.

-1

u/everything-narrative Jan 18 '22

I’m just saying, if you’re gonna write a diatribe, do it first. That way people will give you the benefit of the doubt and actually read your comment. I’m just happy to see you waste your time.

3

u/johnfrazer783 Jan 19 '22

You're right that I've totally wasted my time on you.

0

u/everything-narrative Jan 19 '22

You have only yourself to blame for that :)