Opcode Dispatch

2001-07-29 Thread Bryan C . Warnock
Not that this is the most scientific testing in the world, but I did write a couple variations of an opcode dispatch loop just to see how they compare. Of course, I violated rule number one of writing fast code - I didn't run it on a slow machine. Shame on me. Given an 80K opcode stream consi

Modules, Versioning, and Beyond

2001-07-29 Thread Bryan C . Warnock
I've been contemplating this off and on for a while now, but the lack of a Grand Unified Theory of Module Versioning has always led me to shelve whatever thoughts I may have had to the back of my mind - or to /dev/null. There was a lot of peripheral discussion, however, here at TPC, and a lot of

Re: Modules, Versioning, and Beyond

2001-07-29 Thread John Siracusa
On 7/29/01 12:48 PM, Bryan C. Warnock wrote: > Let's just arbitrarily assume that the > major number of the version is equivalent to that version of the API. > (In other words, Foo 1.05 gives us a promise that it uses the same API > as 1.02 and 1.08. Foo 2.01 would use a different (however slight

Re: if then else otherwise ...

2001-07-29 Thread raptor
> in ?:: or any other condition checking block, 0 is true, everything else is > false. I am yet to see why otherwise or any third condition is needed. If > that's then we can have 4 conditions 1,0,-1,undef, and we can keep going. > That is why there are conditions, if you want to check for -1 you

Re: if then else otherwise ...

2001-07-29 Thread Bryan C . Warnock
On Sunday 29 July 2001 04:32 pm, raptor wrote: > index(ref $var, 'A') - 1 ? SCALAR-LVALUE-case : HASH-case : ARRAY-case; That one is actually rather clever Most of your examples, however, look like you are attempting to bandage some poorly designed code upstream. (Perhaps not, but writing

RE: if then else otherwise ...

2001-07-29 Thread Sterin, Ilya
in ?:: or any other condition checking block, 0 is true, everything else is false. I am yet to see why otherwise or any third condition is needed. If that's then we can have 4 conditions 1,0,-1,undef, and we can keep going. That is why there are conditions, if you want to check for -1 you must s

Re: if then else otherwise ...

2001-07-29 Thread raptor
> Linguistically, "if then else, otherwise" doesn't make sense, since 'else' > and 'otherwise' are synonymous. ]- ok .. I choosed wrong word... I'm not native English sorry... but I agree that if-else-otherwise construct is not so good, for most of the people... I forgot about it already :") > ?

Re: if then else otherwise ...

2001-07-29 Thread Bart Lateur
On Sun, 29 Jul 2001 18:08:00 +0300, raptor wrote: >But at least the second shortcut is worth it, i think : >> >>cond ? then : else : otherwise > >This has a vague smell of Fortran. > >]- I don't know Fortran sorry :") Then check this out.

Re: if then else otherwise ...

2001-07-29 Thread Bryan C . Warnock
Linguistically, "if then else, otherwise" doesn't make sense, since 'else' and 'otherwise' are synonymous. ? : : suffers from the same problem, just in terms of the ternary ?: operator (which of course, wouldn't be ternary anymore) instead of English. I'm not sure if there will be ambiguity

FW: if then else otherwise ...

2001-07-29 Thread Brent Dax
# This makes no sense. ?: tests a boolean value, which is either true or false. # There is no ternary state for a boolean value. True/False, Yes/No, On/Off, # 1/0. Are you suggesting Yes/No/Maybe? Or are you redefining True and False? No. He's effectively saying this: condition ? executed-if-po

Re: if then else otherwise ...

2001-07-29 Thread raptor
But at least the second shortcut is worth it, i think : > >cond ? then : else : otherwise This has a vague smell of Fortran. ]- I don't know Fortran sorry :") = iVAN [EMAIL PROTECTED] =

Re: if then else otherwise ...

2001-07-29 Thread raptor
> This makes no sense. ?: tests a boolean value, which is either true or false. > There is no ternary state for a boolean value. True/False, Yes/No, On/Off, > 1/0. Are you suggesting Yes/No/Maybe? Or are you redefining True and False? ]- I'm not talking about boolean's... but mostly this can be r

Re: if then else otherwise ...

2001-07-29 Thread John Porter
Bart Lateur wrote: > This has a vague smell of Fortran. Nothing vague about it. It is exactly analogous to Fortran's three-way if. -- John Porter

Re: if then else otherwise ...

2001-07-29 Thread John Porter
David Grove wrote: > There is no ternary state for a boolean value. True/False, Yes/No, On/Off, > 1/0. Are you suggesting Yes/No/Maybe? Or are you redefining True and False? He's suggesting True/False/-True (as in, 1/0/-1, which is what you get from cmp and <=>). How hard is that to understant?

Re: if then else otherwise ...

2001-07-29 Thread Bart Lateur
On Sun, 29 Jul 2001 14:22:23 +0300, raptor wrote: >But at least the second shortcut is worth it, i think : > >cond ? then : else : otherwise This has a vague smell of Fortran. -- Bart.

Re: if then else otherwise ...

2001-07-29 Thread David Grove
This makes no sense. ?: tests a boolean value, which is either true or false. There is no ternary state for a boolean value. True/False, Yes/No, On/Off, 1/0. Are you suggesting Yes/No/Maybe? Or are you redefining True and False? Doesn't matter. What you're asking has no counterpart in boolean l

Re: if then else otherwise ...

2001-07-29 Thread raptor
> I'm lost. How would you decrease the number of elsif statements with > otherwise??? ]- it is not to decrease the number of "elsif" (this that i hate elsif was just comment :") not that u have to stop using it ), but to give a shortcut ... ok forget about "otherwise" ( i also think no one will