Convenience has been an important part of design of Perl from what I understand. Default variables abound. Typing is implicit. Context affects parsing. There is usually more than one way to do things. But generally, it seems, there is order in the chaos. There are, for example, clear rules for determining when something is list or scalar context and mechanisms for forcing a context if you wish. The same goes for implicit typing. Even the flexibility is consistent.
Arguably, even the two examples above are "consistent". A clearly defined contextual rule exists to predict the behavior of $ and while(...). But in another sense, they are not. The context itself, however clearly defined, is a very narrow context, amounting to a special case.
Inconsistencies are not necessarily bad for a language. Natural language abounds in them, and one of the things I have always admired in Perl is the way it tries to emulate the convenience and flexibility of natural language. And yet they also pose problems for teaching. Languages, even natural languages, that contain lots of special case constructions are much harder to learn well than fairly regular languages.
I'm sure the two examples above are old hat to everyone here, but they were new to me. So now I am wondering what other such "inconsistencies for the sake of convenience" exist in Perl? Would the kind monks care to share additional ones that they have come across? And what are your thoughts on the merits or dismerits of "inconsistency for the sake of convenience?"
Best, beth
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Inconsistent for the sake of convenience
by ysth (Canon) on Feb 17, 2009 at 05:15 UTC | |
by codeacrobat (Chaplain) on Feb 17, 2009 at 21:26 UTC | |
|
Re: Inconsistent for the sake of convenience
by tilly (Archbishop) on Feb 17, 2009 at 08:34 UTC | |
by Porculus (Hermit) on Feb 17, 2009 at 21:06 UTC | |
|
Re: Inconsistent for the sake of convenience
by moritz (Cardinal) on Feb 17, 2009 at 08:47 UTC | |
|
Re: Inconsistent for the sake of convenience
by Narveson (Chaplain) on Feb 17, 2009 at 15:38 UTC | |
|
Re: Inconsistent for the sake of convenience
by blokhead (Monsignor) on Feb 17, 2009 at 18:30 UTC | |
by hobbs (Monk) on Feb 19, 2009 at 04:20 UTC | |
|
Re: Inconsistent for the sake of convenience
by repellent (Priest) on Feb 26, 2009 at 08:27 UTC |