I've heard a newcomer or two mention difficulty in the past in understanding why some words leave their arguments on the stack and some don't. They seem to prefer a convention of one way or another to make it easier to remember.
I tend to prefer that the words follow the way they are commonly used, thus reducing stack shuffling operations. I'm happy to remember or look up the documentation to see what the stack effect of the word is. If it follows usage to reduce stack shuffling it's the intuitive stack effect. Hopefully. I used Eduardo's idea of stack effect usage in the ogg player and I liked it. I treated the player object as something that stayed on the stack always and the words were just something that transformed it from one state to another, always leaving it on the stack. It reduced the number of "[ .. ] keep" calls around which I find visually distracting. It's good to play around with different ways of writing factor code imho. It's one of the things that keeps me interested in the language. Chris. -- http://www.bluishcoder.co.nz ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Factor-talk mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/factor-talk
