in reply to Consistency, syntax, and little minds

However, I suggest that where an array or hash is to be modified a reference should be passed. In this manner, any unescaped hash or array in code could be read as an in place expansion of that variable; removing ambiguity and making the code easier to understand for beginners.
There is already a language addressing the sentiments expressed above. It's called Python.

Abigail

  • Comment on Re: Consistency, syntax, and little minds

Replies are listed 'Best First'.
Re: Re: Consistency, syntax, and little minds
by belg4mit (Prior) on Oct 04, 2002 at 15:09 UTC
    Maybe. However my point was not to create a language to solve a "problem" (and this certainly is not a "problem" in the sense of one which a language would be created to be solve), but a "problem" with the language. I simply wished to see what others thought of the matter, and whether the reasoning was sound. Not to be pointed at Ruby/Python/Flavor-of-the-month, as a means of sidestepping the issue.

    --
    perl -wpe "s/\b;([mnst])/'$1/g"

      I wasn't side stepping any issue. I was just pointing to a language that was created not to have "problem"s as the one you described regarding push. Python has a much more regular syntax than Perl - and that's what you like push to have.

      I don't think the syntax of push is a problem, not at all. By being non-regular, it's easier to program, and to learn. One doesn't have to know references to be able to use push.

      Abigail