4 ms·
> This flexibility also means that non standard code is easier to write in perl. The tool gets a bad reputation at the hands of poor coding practices. A higher
by tetha 3y ago
> This flexibility also means that non standard code is easier to write in perl. The tool gets a bad reputation at the hands of poor coding practices. A higher level of trust and self-discipline is needed.
And this becomes a problem in teams.
I do somewhat miss perl, because perl and some libraries did some things better than later languages. You could express some ideas very concisely. Or, croak and carp only reporting functions crossing module or library boundaries in a stack trace (instead of some java teams complaining that the log aggregation refuses to collect 50kb+ sized stacktraces, not even exaggerating there).
Alternatives like python force you into a more maintainable style. Like, don't get me wrong, you can write unmaintainable code in any language, and python would be my language of choice to make a horrible non-understandable mess with the extensive meta programming capabilities.
But with perl, you kinda have to put in effort to stay on the simple path. If you leave that part, it quickly becomes very dark. And I know some of my co-workers.
- Enk1du 3y agoFor me, it's code review that makes me write in a maintainable style. It's the team that's responsible for a code base and objections are raised whenever anyone thinks that they'll struggle to understand this or that line. We also enforce consistency. Yes, you _can_ choose any character for quoting lists, but for the love of Pete, you _will_ follow how it's done in every other case (in that file, at least). I'll miss you qw//, but I was out-voted. :(
- sonofhans 3y agoqw// was always my favorite, too — distinctive, and quick to type.
- librasteve 3y agoqw/one two three/; in raku is <one two three>