Style 3 is very nice. As to word counting, it shouldn't be that hard to figure out an algorithm which removes the need to traverse the entire string.
For example, every time the current location is a space and the next keystroke is a non-space, you have begun a new word. -- or -- every time the current location is a non-space and the next keystroke is a space, you have completed a word. Then you have to figure out deletes and inserts. -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to elm-discuss+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.