3 ms·
With other languages there's some hope of a free lunch and it engages our tendency to optimism. Asking as someone who's mostly only written PHP (and some javas
by tnorthcutt 6y ago
With other languages there's some hope of a free lunch and it engages our tendency to optimism.
Asking as someone who's mostly only written PHP (and some javascript, more recently): can you expand on this? What kind of "hope of a free lunch" is there with other languages?
- jrumbut 6y agoI think there are a few, and maybe I am the only one who has ever been foolish enough to think these things or incompetent enough not to achieve them. The first is the promise of DSLs and meta programming, where you can tune the syntax of the language to more naturally express your problem domain. When this works it's beautiful, but sometimes it is a distraction and makes the code difficult to debug. The second, which is conceptually very different but I find it can play out similarly, are rich type systems where you can hopefully build up your application as a series of well defined type relations and transformations. Again, when this works you get really robust, reliable, and easy to modify software but there are often cross cutting concerns or business practices that break the model. Edit: when I talk about a free lunch or a silver bullet, I am often thinking about the writing of Fred Brooks.
- ragnese 6y agoYou're not the only one. I have to actively resist the urge. In some sense, I see the appeal of Go in making this kind of "mental masturbation" not even possible. On the other hand, I've dug myself deep enough, enough times, that I've developed a decent sense of when these endeavors are likely to pay off (writing an actual DSL never has for me, and likely never will unless you're coding to a very stable spec). But there's a TON of low- and mid-hanging fruit to be had by "making impossible states unrepresentable" and when you draw the line in the right place, it pays massive dividends.