the KTM LC4 engines are awesome when fettled (cheap to do if you get right info ) and easy to service (locknut/tappet valve adjustment) two oil filters but still a piece of cake to do.
KTM WP suspension is also yards better than the yamaha stockers.
fuel range is short with the stock tank.
You should however be getting a newer bike with the XT if the price is the same.
I had my old KTM 640 Duke for 7 years and abused it over many winters and it was only at the end that it was starting to show some electrical gremlins .
I have a Ten cos Ktm dont have a equivalent bike and if they did it would probably cost 2-3k more, so I'd still have a ten

.