Recently an early-music expert friend wrote a comment that's made me think more than usual. She described herself as a "period" composer, because her composing is linked to the music she plays and studies, and tends to be in closely related styles.
An argument immediately developed, debating the pros and cons (and validity or lack thereof) of writing in "historical" styles. Some were quick to point out that music textbooks from earlier time periods still exist, and they provide coherent models for those in the mood to imitate them. In fact, in so doing, a modern composer would be doing as some students no doubt did, and, in fact, as some music students today still do.
Others were equally quick to say there's simply no way to understand completely the experience of someone at another point in time. You can certainly pattern your music after those who wrote at earlier times, but you will never be able to be one of those earlier musicians. You will never completely understand the things that motivated their music, and will, at best, only be able to produce a pale imitation of their work. Certainly a worthy exercise, but not to be taken seriously as an artistic endeavor.
I'll agree that few of the student attempts to produce, say, two-part inventions in a style similar to that of Bach, that I've heard, would be worth playing more than once; in fact, it's unusual to get through one without having to wince. But most of those attempts are by people who aren't composition students, and who don't have the luxury of time. They'll write perhaps one piece of that kind in their lives, heave a sigh of relief, and go on to something else. The idea of writing fifty or so of them, that is, of taking time to develop some degree of mastery, is not one they'll have considered. They'll never go back, months or years later, and rewrite, edit, expand, trim, and so on, because there's no external reward for doing so.
I have seen one collection of six (or so) inventions by a composer, whose name I've forgotten, who did apparently publish and release them as a collection. I wasn't impressed by what I found on leafing through them, but again, I got the impression this was something of a sidelight; a composer who usually deals with other materials, in other styles, picked up this form and took it for a test drive. It wouldn't be appropriate, then, to draw many conclusions about this artist's work as a whole from that particular sample.
All of this, though, is far wide of the point. A composer, keyboardist, and scholar I respect, says she writes in historical styles by preference. What do I make of this?
Any composer, in any time period, is writing mainly for their own time and place, regardless of how they may feel about it. While time may "catch up" with a composer, and things in their work that seemed radical, unusual, or new when they were written may become accepted, revered, and (alas) even commonplace, when those pieces were written the composer couldn't have known how things would turn out. That composer was taking a risk. The only reason we don't realize the size of the risk is we usually don't hear about the ones who fail, the ones whose innovations don't become the common practice of succeeding generations.
There's no payoff, today, in imitating the earlier model; we know how things turned out, or at least, we know how they've turned out so far.
The point of writing music in a historical style is different. The goal is to learn from a predecessor you respect and whose work you love, and to express yourself in a style that feels natural to you. What someone else thinks about it is a secondary consideration, at best.
So even if you are writing a two-part invention in 2017, intended to be played on a French double harpsichord, you are writing for a twenty-first-century audience. Nobody seriously questions this. A composer who does such a thing is not trying to be an eighteenth-century composer, though they might be using techniques similar to those used by one or more of them. Composers are entitled to use whatever creative tools please them, within certain obvious limits. They don't have to ask permission to use this or that form or style.
Want to write a sonata in the style of Mozart or Haydn? Good luck, but go right ahead. After all, not being Mozart is no crime, and if writing in a similar style allows you to write music you like, get busy! Sixteenth-century vocal polyphony your thing? Go for it! The least you will get is education, and the more seriously you take your work, the more it will reward you.
And if you prefer more up-to-date styles, techniques, methods, and so on, by all means go for the cutting edge! The world of music really is big enough for all of us.