1. Init variable on declare

Hi
I'm in the 'no need to initialise on declaration camp'.

I dream about this.
func name -- function
end name   -- end function

proc name2 -- procedure
end name2 -- end procedure

/amux

new topic     » topic index » view message » categorize

2. Re: Init variable on declare

amux wrote:
> 
> I dream about this.
> func name -- function
> end name   -- end function
> 
> proc name2 -- procedure
> end name2 -- end procedure

RobC,  how much of a speed increase could we  expect in execution if we reduced
the tokens from 'function' to 'func' and 'procedure' to 'proc?' The interpreter
would be looking for 50% less text for each token (66% for procedure)!!!!!!!!!!

new topic     » goto parent     » topic index » view message » categorize

3. Re: Init variable on declare

c.k.lester wrote:
> 
> amux wrote:
> > 
> > I dream about this.
> > func name -- function
> > end name   -- end function
> > 
> > proc name2 -- procedure
> > end name2 -- end procedure
> 
> RobC,  how much of a speed increase could we  expect in execution if we
> reduced
> the tokens from 'function' to 'func' and 'procedure' to 'proc?' The
> interpreter
> would be looking for 50% less text for each token (66% for
> procedure)!!!!!!!!!!

Yuck! That's one of the things I like about Euphoria as-is. Not that it's
verbose, but for some reason it is more pleasing to me the way it is.

If you want to shorten the tokens you might as well just use the C-like braces!

--
"Any programming problem can be solved by adding a level of indirection."
--anonymous
"Any performance problem can be solved by removing a level of indirection."
--M. Haertel
"Premature optimization is the root of all evil in programming."
--C.A.R. Hoare
j.

new topic     » goto parent     » topic index » view message » categorize

4. Re: Init variable on declare

Jason Gade wrote:
> c.k.lester wrote:
> > amux wrote:
> > > I dream about this.
> > > func name -- function
> > > end name   -- end function
> > > proc name2 -- procedure
> > > end name2 -- end procedure
> > RobC,  how much of a speed increase could we  expect in execution if we
> > reduced
> > the tokens from 'function' to 'func' and 'procedure' to 'proc?' The
> > interpreter
> > would be looking for 50% less text for each token (66% for
> > procedure)!!!!!!!!!!
> Yuck! That's one of the things I like about Euphoria as-is. Not that it's
> verbose,
> but for some reason it is more pleasing to me the way it is.
> If you want to shorten the tokens you might as well just use the C-like
> braces!

If it was noticeably faster, I was going to suggest 'f'
and 'p' instead, but I like your idea better. Braces!!!

proc and func is still very readable, and if it gives a speed increase, why
not adopt it?

procedure do_nuttin()
end procedure

proc do_nuttin()
end proc

If we could get a 50% speed increase over current behavior, wouldn't that
be wunnerful?!?! 8)

new topic     » goto parent     » topic index » view message » categorize

5. Re: Init variable on declare

c.k.lester wrote:
> 
> amux wrote:
> > 
> > I dream about this.
> > func name -- function
> > end name   -- end function
> > 
> > proc name2 -- procedure
> > end name2 -- end procedure
> 
> RobC,  how much of a speed increase could we  expect in execution if we
> reduced
> the tokens from 'function' to 'func' and 'procedure' to 'proc?' The
> interpreter
> would be looking for 50% less text for each token (66% for
> procedure)!!!!!!!!!!

There would be zero increase in execution speed,
and a 0.000000001% increase in parse speed.
It would also break existing code.

Regards,
   Rob Craig
   Rapid Deployment Software
   http://www.RapidEuphoria.com

new topic     » goto parent     » topic index » view message » categorize

6. Re: Init variable on declare

Robert Craig wrote:
> c.k.lester wrote:
> > amux wrote:
> > > I dream about this.
> > > func name -- function
> > > end name   -- end function
> > > proc name2 -- procedure
> > > end name2 -- end procedure
> > RobC,  how much of a speed increase could we  expect in execution if we
> > reduced
> > the tokens from 'function' to 'func' and 'procedure' to 'proc?' The
> > interpreter
> > would be looking for 50% less text for each token (66% for
> > procedure)!!!!!!!!!!
> There would be zero increase in execution speed,
> and a 0.000000001% increase in parse speed.

What about the speed increase in DEVELOPMENT time?  I examined my own code
base for BBCMF, and I found 320 occurrences of 'procedure.'   If each time
I typed 'procedure' it took me one second, then using 'proc' would provide
a savings of a little over 3.5 minutes! And I really could have used those
precious minutes.  My hands could have used the break from the repititious
typing of 'edure' 320 times. Maybe I should sue RobC to recoup the medical
bills I will no-doubt eventually have due to my carpal tunnel syndrome!!!!

> It would also break existing code.

Well, to hell with progress, eh?!?!?!!!???!?!!!?!?!?!!!

P.S. I am against init variable on declare,  but won't mind if it is added
as long as there's no performance penalty in execution, parsing, and- what
RobC likes to conveniently forget- DEVELOPMENT TIME.
P.P.S. This would have been a good April Fool's Day post. :)

new topic     » goto parent     » topic index » view message » categorize

7. Re: Init variable on declare

> What about the speed increase in DEVELOPMENT time?  I examined my own code
> base for BBCMF, and I found 320 occurrences of 'procedure.'   If each time
> I typed 'procedure' it took me one second, then using 'proc' would provide
> a savings of a little over 3.5 minutes! And I really could have used those
> precious minutes.  My hands could have used the break from the repititious
> typing of 'edure' 320 times. Maybe I should sue RobC to recoup the medical
> bills I will no-doubt eventually have due to my carpal tunnel syndrome!!!!

You should try using ed, it's quicker than typing 'proc'. :)

new topic     » goto parent     » topic index » view message » categorize

8. Re: Init variable on declare

c.k.lester wrote:
> 

> 
> Well, to hell with progress, eh?!?!?!!!???!?!!!?!?!?!!!
> 

> P.P.S. This would have been a good April Fool's Day post. :)

Nah, all that talk ab out efficiency, and your credibility would have 
been shot with all those exclamation points and question marks...

Matt

new topic     » goto parent     » topic index » view message » categorize

9. Re: Init variable on declare

c.k.lester wrote:
> What about the speed increase in DEVELOPMENT time?  I examined my own code
> base for BBCMF, and I found 320 occurrences of 'procedure.'   If each time
> I typed 'procedure' it took me one second, then using 'proc' would provide
> a savings of a little over 3.5 minutes!
<shameless plug>
If you use Edita, you only have to type "pro" to get
procedure ()
end procedure
</shameless plug>
If you use ed.ex, typing "procedure " gets you the same.

Regards,
Pete
PS I am getting close to a new release now. I've added something I've called
"legacy tab character handling" to solve one of the thornier issues, please see
http://palacebuilders.pwp.blueyonder.co.uk/ltchelp.txt and let me know if
anything does not make sense. Hopefully there will be some software to go with
that text file in the not too distant future.
 And I really could have used those
> precious minutes.  My hands could have used the break from the repititious
> typing of 'edure' 320 times. Maybe I should sue RobC to recoup the medical
> bills I will no-doubt eventually have due to my carpal tunnel syndrome!!!!
> 
> > It would also break existing code.
> 
> Well, to hell with progress, eh?!?!?!!!???!?!!!?!?!?!!!
> 
> P.S. I am against init variable on declare,  but won't mind if it is added
> as long as there's no performance penalty in execution, parsing, and- what
> RobC likes to conveniently forget- DEVELOPMENT TIME.
> P.P.S. This would have been a good April Fool's Day post. :)

new topic     » goto parent     » topic index » view message » categorize

10. Re: Init variable on declare

Pete Lomax wrote:
> 
> c.k.lester wrote:
> > What about the speed increase in DEVELOPMENT time?  I examined my own code
> > base for BBCMF, and I found 320 occurrences of 'procedure.'   If each time
> > I typed 'procedure' it took me one second, then using 'proc' would provide
> > a savings of a little over 3.5 minutes!
> <shameless plug>
> If you use Edita, you only have to type "pro" to get
> procedure ()
> end procedure
> </shameless plug>
> If you use ed.ex, typing "procedure " gets you the same.
> 
> Regards,
> Pete

snip

<another shameless plug>
If you use IDE or Editor.exw that ships with IDE, you can set up function keys
and related text such that pressing the Fn key writes the text instead. Find this
feature under Options/Hot Keys.
judith evans

new topic     » goto parent     » topic index » view message » categorize

11. Re: Init variable on declare

Pete Lomax wrote:
> c.k.lester wrote:
> > What about the speed increase in DEVELOPMENT time?  I examined my own code
> > base for BBCMF, and I found 320 occurrences of 'procedure.'   If each time
> > I typed 'procedure' it took me one second, then using 'proc' would provide
> > a savings of a little over 3.5 minutes!
> <shameless plug>
> If you use Edita, you only have to type "pro" to get
> procedure ()
> end procedure
> </shameless plug>

I do love that feature.

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu