"Dimitrie O. Paun" dpaun@rogers.com writes:
- Implement the meat in a funcT that takes a boolean as an argument telling it if the input is A or W, and just have the func[AW] forward the call to funcT
This works only within one module, and there are other problems. That is, if it does any non-trivial work with the string, that might require that be converted between A<->W, it's better to go for 4, to avoid multiple conversions (which are expensive).
Of course another problem with option 5 is that you lose all type checking, so the compiler cannot warn you when you confuse the string types, plus it requires ugly casts. Better avoided IMO.