4 ms·
I don't think I agree. Most people spend more time reading than writing code so programming languages should be optimized to be easier to read whereas tooling s
by xmprt 5y ago
I don't think I agree. Most people spend more time reading than writing code so programming languages should be optimized to be easier to read whereas tooling should be made to simplify writing code. New syntax or macros sounds like it would make the language harder to read. I agree that an advanced machine learning model for generating boilerplate code isn't the right approach but I also don't think we should extend languages for this. Tooling like code generators and linters are a good middle ground.
- orangecat 5y agoNew syntax or macros sounds like it would make the language harder to read. Often the opposite is true. For example Java records are far easier to read and understand than the pages of boilerplate that they replace.
- xmprt 5y agoThat sounds like an issue with how Java was designed. There are plenty of languages that solve Java's boilerplate problems without adding new syntax for records.
- chongli 5y agoIf you’ll review my original comment, I never said new syntax. I said better syntax. If your language design leads to a lot of boilerplate in idiomatic use then it needs to be better. Adding new syntax is just putting a bandaid on the problem.
- RangerScience 5y agoFYI+IMO: Both Ruby and Scala have excellent ways to reduce these issues that occur at the language level, and make it easier to both read and write. I don't know either way if that means you should extend languages to handle it, but at least it's definitively possible to write the language that way from the beginning. Otherwise yup, agree with you; ML for problematic boilerplate isn't the right approach, but other code generators and linters are really good and get you most of the way there.