Perhaps this is an example from C++, but it illustrates my point. This
may be a better example, if we are to step back a decade or two:
int i;
for (i = 0; i < 5; i++)
What is so 'inherently declaratory' about this for() ?
With this example, you've illustrated the exact reason why this is not
po
At 22:06 30/08/2003, [EMAIL PROTECTED] wrote:
I'm talking about the traditional for construct on which the PHP version
is based. In PHP, that part of the for construct is somewhat meaningless.
I'm saying that it is not as programmatically powerful as it could be. I
understand how it currently wo
On Sunday, Aug 31, 2003, at 07:36 America/New_York, Jeremy Johnstone
wrote:
It ain't gonna happen, so why continue to make an ass of yourself?
When you get three of the top people in PHP's development telling you
it
will NEVER happen, then you should really pay attention! No amount of
explainin
[EMAIL PROTECTED] wrote:
I was sincere. I meant "modern" to mean more recent. Though, I do
agree with the correlation between your interpretation and response. I
apologize.
Yes, we can tell that you had a different, less offensive definition of
"modern." Our understanding is tripled, in fact. :
I am saying that perhaps the for loop should treat that part as a
declaratory statement and mask outer variables.
On Saturday, Aug 30, 2003, at 15:28 America/New_York, Rasmus Lerdorf
wrote:
Yes, but you are adding a declaration separate from the for loop there.
So not the same at all given ther
I was sincere. I meant "modern" to mean more recent. Though, I do agree
with the correlation between your interpretation and response. I
apologize.
On Saturday, Aug 30, 2003, at 21:44 America/New_York, George
Schlossnagle wrote:
On Saturday, August 30, 2003, at 09:12 PM, [EMAIL PROTECTED]
wr
I was sincere. I meant "modern" to mean more recent. Though, I do agree
with the correlation between your interpretation and response. I
apologize.
On Saturday, Aug 30, 2003, at 21:44 America/New_York, George
Schlossnagle wrote:
On Saturday, August 30, 2003, at 09:12 PM, [EMAIL PROTECTED]
wr
I was sincere. I meant "modern" to mean more recent. Though, I do agree
with the correlation between your interpretation and response. I
apologize.
On Saturday, Aug 30, 2003, at 21:44 America/New_York, George
Schlossnagle wrote:
On Saturday, August 30, 2003, at 09:12 PM, [EMAIL PROTECTED]
wr
On Saturday, August 30, 2003, at 09:12 PM, [EMAIL PROTECTED]
wrote:
I thank you for your open-mindedness, but I must admit I was in the
fault. I supplied a version from a modern language such as C++.
No need to be a dick about it. Calling C++ 'modern' is about as
sensible as calling C 'ancien
I thank you for your open-mindedness, but I must admit I was in the
fault. I supplied a version from a modern language such as C++.
On Saturday, Aug 30, 2003, at 20:36 America/New_York, DvDmanDT wrote:
As I've understood it your example is like only valid in the latest C++
standards or something
NOTE: I am reentering the fray on provocation.
On Saturday, Aug 30, 2003, at 19:59 America/New_York, Ard Biesheuvel
wrote:
for (int i = 0; i < 5; i++)
{
int num = array[i];
printf("%d", num);
for (int i = 0; i < 5; i++)
printf("%d", i * num);
}
Perhaps thi
As I've understood it your example is like only valid in the latest C++
standards or something... Possibly also in newer C... But it's new... MSVC6
does not have that implented I think...
But I might be pretty badly misstaken on this one...
--
// DvDmanDT
MSN: [EMAIL PROTECTED]
Mail: [EMAIL PROT
for (int i = 0; i < 5; i++)
{
int num = array[i];
printf("%d", num);
for (int i = 0; i < 5; i++)
printf("%d", i * num);
}
I'll try to explain it in your own language.
no declarations inside for() in C ===> your example ===> *crap*
loose typing ===> no decla
Actually, with a careful implementation, backwards compatibility can be
achieved. A separate symbol table, indeed I agree, would be
undesirable. Instead, the interpreter could simply mask the other
variables of the same name during the loop, and return things to normal
afterward.
P.S.
Consider
Not so. I supplied this version earlier:
int array[] = {1, 2, 3, 4, 5};
for (int i = 0; i < 5; i++)
{
int num = array[i];
printf("%d", num);
for (int i = 0; i < 5; i++)
printf("%d", i * num);
}
On Saturday, Aug 30, 2003, at 15:19 America/New_York, Rasmus Le
On Sat, 30 Aug 2003 [EMAIL PROTECTED] wrote:
> I'm talking about the traditional for construct on which the PHP
> version is based. In PHP, that part of the for construct is somewhat
> meaningless. I'm saying that it is not as programmatically powerful as
> it could be. I understand how it currentl
PHP has worked like this for years and people were & are happy with it. Even
if you somehow were able to convince (which is not happening) that this
change is useful, it still would not happen. A major functionality change
such as this would break backwards compatibility and render vast majority
Hi,
You have made your statement, we heard you, and you have made your point.
You will just have to accept that we do not consider this a problem and
don't intend on changing it (ever).
Please let this thread die...
Andi
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, vi
It is you who attributes such an elevating status to this discourse. I
had not intention of pretentiousness. You have, in fact, condemned
yourself:
>>PHP is designed for dummies.
On Saturday, Aug 30, 2003, at 14:55 America/New_York, Wez Furlong wrote:
OK, so how long before we get to prove God
I'm talking about the traditional for construct on which the PHP
version is based. In PHP, that part of the for construct is somewhat
meaningless. I'm saying that it is not as programmatically powerful as
it could be. I understand how it currently works (what you have been
stating), and I am sa
TED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, August 30, 2003 7:41 PM
Subject: Re: Re[2]: [PHP-DEV] Variable Scope
On Saturday, Aug 30, 2003, at 14:31 America/New_York, Marcus Börger
wrote:
> Hello LingWitt,
Hi.
>
> - PHP is typeless
Thanks, but that's established.
>
On Sat, 30 Aug 2003 [EMAIL PROTECTED] wrote:
> That part of the for loop is inherently declaratory.
That's where you are wrong.
for($i=0; $i<10; $i++)
There is no declaration there at all. $i=0 is simply an assignment.
Nothing more, nothing less. Loops and other constructs do not have
separa
Dear LingWitt,
On Sat, 30 Aug 2003 [EMAIL PROTECTED] wrote:
> > - for doesn't span any declaration level and hence does not have its
> > own symbol table
>
> This is ridiculous.
No, it is reality! If you don't like our reality, but instead want to
live on your own little one-person reality,
Hi, if that bothers you so much, why don't you just write your own version
of PHP and allow ppl to download it, then we'll see how many ppl downloads
your version... You know, it's more like a feature than a bug...
--
// DvDmanDT
MSN: [EMAIL PROTECTED]
Mail: [EMAIL PROTECTED]
<[EMAIL PROTECTED]>
On Saturday, Aug 30, 2003, at 14:31 America/New_York, Marcus Börger
wrote:
Hello LingWitt,
Hi.
- PHP is typeless
Thanks, but that's established.
- for doesn't span any declaration level and hence does not have its
own
symbol table
This is ridiculous.
- PHP is not c, not C++ not Java, not...
Hello LingWitt,
- PHP is typeless
- for doesn't span any declaration level and hence does not have its own
symbol table
- PHP is not c, not C++ not Java, not...IT IS PHP
Saturday, August 30, 2003, 8:24:49 PM, you wrote:
Lic> That part of the for loop is inherently declaratory. As a result, the
That part of the for loop is inherently declaratory. As a result, the
interpreter should add any variables in that portion to the new symbol
table of that for loop. Any most other languages, that portion of the
for loop creates variables specifically in the scope of the for loop.
Other variable
PHP, is a loosely typed language. If you want a strongly typed language
where you can redeclare and re-use the same variable names within the same
scope, then use a strongly typed language. There are plenty of them
around. This will never ever change in PHP.
-Rasmus
On Sat, 30 Aug 2003 [EMAIL
On Sat, 30 Aug 2003 [EMAIL PROTECTED] wrote:
>
> On Saturday, Aug 30, 2003, at 10:33 America/New_York, Derick Rethans
> wrote:
>
> > On Sat, 30 Aug 2003 [EMAIL PROTECTED] wrote:
> >
> >> Since the inner loop declares $i again, it should mask the outer
> >> loop's
> >> $i as per other languag
This is not a how-to question. This is a statement. There was not
question mark in any of my emails. This is criticism, and
criticms=>improvement=>development.
On Saturday, Aug 30, 2003, at 10:54 America/New_York, Wez Furlong wrote:
PHP is not C++.
Please go and carefully read the whole
PHP is not C++.
Please go and carefully read the whole PHP manual from start to finish, and
if you are still unsure of how to use PHP, ask your questions on the general
list.
Your posts have nothing to do with internals issues.
--Wez.
> //In the following example, the inner loop 'i' masks the ou
On Saturday, Aug 30, 2003, at 10:33 America/New_York, Derick Rethans
wrote:
On Sat, 30 Aug 2003 [EMAIL PROTECTED] wrote:
Since the inner loop declares $i again, it should mask the outer
loop's
$i as per other languages. Besides being useful, it makes more sense.
No, that's not true. You don't
On Sat, 30 Aug 2003 [EMAIL PROTECTED] wrote:
> Since the inner loop declares $i again, it should mask the outer loop's
> $i as per other languages. Besides being useful, it makes more sense.
No, that's not true. You don't redeclare ANYTHING here... you're just
using the same variable $i, just
Since the inner loop declares $i again, it should mask the outer loop's
$i as per other languages. Besides being useful, it makes more sense.
Otherwise, the declaratory statement in the second loop is completely
meaningless.
On Saturday, Aug 30, 2003, at 10:21 America/New_York, Derick Rethans
On Sat, 30 Aug 2003 [EMAIL PROTECTED] wrote:
> The inner loop $i doesn't mask the outer loop $i.
> Thus, the whole things gets screwed up.
? This example works perfectly fine. What's your problem here? What do
you mean with "mask the outer loop"? Of course if you modify $i INSIDE
the loop the o
Variable scope is mediocre at best. For instances:
$array = array(1, 2, 3, 4, 5);
for ($i = 0; $i < 5; $i++)
{
$num = $array[$i];
echo $num;
for ($i = 0; $i < 5; $i++)
{
echo $num * $i;
}
}
The inner loop $i doesn't mask the outer loop $i.
T
36 matches
Mail list logo