news.volyx.in

It's not what programming languages do, it's what they shepherd you to (nibblestew.blogspot.com)

493 points by ingve · 2387 days ago · 339 comments on HN

Article summary

The article discusses how programming languages can influence the way developers solve problems, often leading to solutions that are natural for the language but not necessarily optimal. This phenomenon is referred to as 'shepherding'. The author provides examples of how different languages shepherd developers into certain practices, such as Perl's use of regexps or C++'s use of header-only libraries. The article highlights the importance of considering the language's ecosystem and its potential impact on development practices.

Main themes

  • language design
  • development practices
  • shepherding
  • globals and concurrency
  • unit testing
  • language ecosystems
  • problem-solving strategies

What commenters say

  • Some commenters argue that languages can indeed shepherd developers into bad practices, but it's also a human problem of being lazy or not knowing better.
  • Others believe that the design of a language can intentionally or unintentionally lead to certain practices, and that language designers should strive to make the 'right' way to do things the easiest.
  • A few commenters disagree with the idea that globals are inherently bad, arguing that with proper understanding and debugging, globals can be managed effectively.
  • Concurrent accesses and modifications can make it difficult to reason about code with global variables, even with access to the source code.
  • Unit tests can help detect problems with global variables and improve code architecture, but some commenters are skeptical of their effectiveness.
  • The use of certain language features, such as exceptions or mutable data, can be influenced by the language's design and ecosystem.
  • Some languages may shepherd developers into writing complex logic in configuration files, which can lead to maintainability issues.