Good code using regexes often has a comment giving an example of a typical string that it matches.
Could this be a first class language feature? It's a great pattern.
An excellent review of the V language and the features it promotes: https://mawfig.github.io/2022/06/18/v-lang-in-2022.html
The code samples are a great example of how you do PL work: you learn about the intended semantics and try to write programs that are broken in interesting ways.
Today I needed a library that takes a regular expression and gives you a string that matches. https://github.com/fent/randexp.js fits that need nicely.
Unfortunately, reading the docs has introduced me to evil patterns like /a^/ and /\1 (a)/. Yikes.
An overlooked PL question: what is easy to try in a given language? In lisp it's easy to try adding extra syntax. In Rust it's easy to try parallelism on iterators (rayon).
Are there other examples? Perhaps Perl and regexes or Haskell and STM?
Wilfred Hughes
Shared words: regexes, example, language
Score: 64.7