Re: Roxen, Pike or by design?

2008-05-22 Thread Bernd Schoeller
Hi Marcus, I think the confusion is not on semantics, but on the discussion level. I have absolutely no doubt that it is impossible to disable override of global identifiers by local identifiers in Pike as it currently stands. I fully agree with your reservations that this would create

Re: Roxen, Pike or by design?

2008-05-22 Thread Marcus Comstedt (ACROSS) (Hail Ilpalazzo!) @ Pike (-) developers forum
Well, the context here is the language Pike, so please realize that when talking about global identifiers, this refers to the Pike concept of global identifiers, unless otherwise specified. And I will assume that the same goes for when someone talks about classes and signatures.

Re: Roxen, Pike or by design?

2008-05-21 Thread Marcus Comstedt (ACROSS) (Hail Ilpalazzo!) @ Pike (-) developers forum
I think there is a sematical confusion here. global identifiers are those which are not (conceptually at least) part of any class. Like time for example. Or MIME, or Protocols. Adding a new global identifer (by adding a new module, for example) does not change the signature of any existing

Re: Roxen, Pike or by design?

2008-05-18 Thread Bernd Schoeller
On Sat, 17 May 2008 18:10:03 +0200, Marcus Comstedt (ACROSS) (Hail Ilpalazzo!) @ Pike (-) developers forum [EMAIL PROTECTED] wrote: If local identifiers couldn't override global, you would not be able to add any global identifiers without breaking existing code. = dead language. Sorry

Re: Roxen, Pike or by design?

2008-05-17 Thread Martin Nilsson (Opera Mini - AFK!) @ Pike (-) developers forum
You probably want to explore the #pragma strict_types. pike test.pike test.pike:5: Warning: Unused local variable newTime. test.pike:5:Calling non function value. test.pike:5:Expected: function test.pike:5:Got : int Pike: Failed to compile script: Compilation failed.

Re: Roxen, Pike or by design?

2008-05-17 Thread Marcus Comstedt (ACROSS) (Hail Ilpalazzo!) @ Pike (-) developers forum
If local identifiers couldn't override global, you would not be able to add any global identifiers without breaking existing code. = dead language.

Roxen, Pike or by design?

2008-05-17 Thread Marcus Comstedt (ACROSS) (Hail Ilpalazzo!) @ Pike (-) developers forum
Why is it strange? private void Check(int time) ok, so in the scope of this function time is an actual parameter of type int. { bla, bla, bla int newTime = time(1); ^ here, you try to call time, which is an

Roxen, Pike or by design?

2008-05-15 Thread cschalkwijk
When defining (in a roxen modue) a function private void Check(int time) { bla, bla, bla int newTime = time(1); more bla bla } trying to call the function time(1) (to get the time) results in an error: Calling non function value. Renaming the method parameter to tme 'solves' the

Re: Roxen, Pike or by design?

2008-05-15 Thread Martin Bähr
why is it strange? you can't have both a variable and a function named time. when you create a local variable (or any other symbol) it overwrites the global one. you can still access the time() function by using predef::time(); greetings, martin.