Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: What esteemed monks think about changes necessary/desirable in Perl 7 outside of OO staffby tobyink (Canon) |
on Sep 12, 2020 at 23:13 UTC ( [id://11121682]=note: print w/replies, xml ) | Need Help?? |
1: Auto-semicolons are bad. Look at Javascript. Who deliberately uses them? Nobody. Who occasionally needs to workaround them? Everybody. 2: Runaway quotes are usually caught anyway; it's just the error message happens several lines further than you expect it to be. For a missing quote mark not to cause a syntax error requires a perfect storm of conditions. (Usually involving quote marks being used in comments.) To anybody using editors with syntax highlighting, this isn't usually much of an issue anyway. I don't think it's necessarily a bad idea, as long as heredocs are exempt. I just don't think it gives us much. 3a: I see no use for this feature. What would it be used for? 3b: It's already possible to close multiple levels of braces on one line. The syntax for it is: }}. You even have fine-grained control over how many levels you close. If you want to close four levels, use }}}}. If you're closing less than four levels, this existing syntax is as compact or more compact than what you suggest. If you're routinely closing more than four levels, consider restructuring your code so it doesn't have so many deeply nested blocks. 4a: The frequently used built-ins mostly have pretty short names anyway. Any shorter and they lose descriptiveness. I don't see how this is a win. 4b: I don't know exactly what you mean. 4c: I really need to fix up my macros implementation and put it on CPAN. 5a: I guess this is a decent one. 5b: By translation table, you mean tr///? Seems like overkill. 5c/5d: head, tail, trim, ltrim, and rtrim are so trivial to implement, I don't see the need for them to be in core. There's a bunch of implementations on CPAN already. 6: for what purpose? 7: global variables are design smell. "Let's introduce new features for global variables" is like saying "let's make the two-argument open more powerful". 8a: It's not hard to check if the return value of index is below a certain limit. 8b: Don't the existing substr and splice functions do this? 9a: Umm, when is already allowed in for loops. 9b: I don't understand what's made easier by this.
In Section
Meditations
|
|