Austin Hastings wrote:


--- James Mastros <[EMAIL PROTECTED]> wrote:


Millsa Erlas wrote:

I have thought of an interesting idea that may allow Perl 6 to make

the

$, @, and % optional on many uses of variables. This involves

simply

extending the function namespace to include all kinds of

structures, and

thus the function namespace does not require symbols, they are

optional.


[...]



In that case, you should be looking into how to make it a pragmata,
rather then pushing the idea on perl6-language.  It shouldn't be too
hard -- a matter of using the equivalent of perl5's
UNIVERSAL::AUTOLOAD,
and the OUTER:: scope.

        -=- James Mastros,
        theorbtwo


The fact that this keeps recurring on P6L is pretty indicative, I
think, that a lot of people don´t value the ability to have an array,
hash, and scalar of the same name quite so much as they regret the need
to respecify the types of all variables every time they´re used.

If it´s really that simple to do, then I´m willing to bet it´ll be
used early and often. Making it a part of ´core´ and in fact planning
to migrate perl in the direction of less useless line noise DOES seem
to me to be a valid task for -language.

=Austin


I believe that people should be given the choice as to whether to use $, @, or %, or not.My suggestion was one possible way to achieve making $, @, and % optional, while still allowing their use and not changing the existing perl 6 language. This is could be done by simply allowing hashs and arrays to be defined in the function namespace. The existing seperate array and hash namespaces would also be retatianed with their % and @ usage as well, giving people choice. I want very much to preserve peoples choice as to which way to do things and I do not want this suggestion implemented in a way if it takes away peoples right to use $, @ and %, or impacts Perl 6's existing grammer in other ways.

One of the reasons I suggest this idea, is indeed variables are very commonly used in many cases, in a program, and typing the prefix characters in my expierience at times is a bit of annoyance, especially since it requires a trip to the shift key. This is not a big problem with things that are seldom used in a language, but when it applies to something as commonly used as variables, it becomes more significant. Maybe its not a huge thing but it is a bit of annoyance at times to me. It may not be to other people thats why if people want to keep using $, @, And %, they should be able to, and I will still want to use them myself at times.

I strongly believe in TIMTOWTDI (There is more than one way to do it), which is one reason I like Perl, is that it gives people freedom, does not restrict them, and gives them flexibility and as many choices as possible to how to best accomplish something. I certianly hope Perl 6 can continue, and even expand this.

Reply via email to