1. Init variable on declare
- Posted by amux <jjsg at abc.se> Apr 04, 2007
- 537 views
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
2. Re: Init variable on declare
- Posted by c.k.lester <euphoric at cklester.com> Apr 04, 2007
- 487 views
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)!!!!!!!!!!
3. Re: Init variable on declare
- Posted by Jason Gade <jaygade at yahoo.com> Apr 04, 2007
- 495 views
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.
4. Re: Init variable on declare
- Posted by c.k.lester <euphoric at cklester.com> Apr 04, 2007
- 501 views
- Last edited Apr 05, 2007
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)
5. Re: Init variable on declare
- Posted by Robert Craig <rds at RapidEuphoria.com> Apr 04, 2007
- 507 views
- Last edited Apr 05, 2007
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
6. Re: Init variable on declare
- Posted by c.k.lester <euphoric at cklester.com> Apr 04, 2007
- 502 views
- Last edited Apr 05, 2007
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. :)
7. Re: Init variable on declare
- Posted by Jules Davy <jdavy at dsl.pipex.com> Apr 04, 2007
- 521 views
- Last edited Apr 05, 2007
> 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'. :)
8. Re: Init variable on declare
- Posted by Matt Lewis <matthewwalkerlewis at gmail.com> Apr 05, 2007
- 510 views
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
9. Re: Init variable on declare
- Posted by Pete Lomax <petelomax at blueyonder.co.uk> Apr 05, 2007
- 509 views
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. :)
10. Re: Init variable on declare
- Posted by Judith Evans <camping at ccewb.net> Apr 05, 2007
- 510 views
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
11. Re: Init variable on declare
- Posted by c.k.lester <euphoric at cklester.com> Apr 05, 2007
- 502 views
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.