tags:

views:

252

answers:

3
+2  A: 

I use adapter, because that's the correct spelling :) but i guess if you're not from the US the correct spelling might be adaptor.

http://en.wikipedia.org/wiki/Adapter

John Boker
+2  A: 

They are both correct, though I think there's a slight preference for adapter to be used for people (such as someone who adapts a piece of music), while adaptor is used for a device or machine; thus, in computing, adaptor would generally be used. Wikipedia mentions this distinction, though without any real references to back it up. I would use whichever you feel more comfortable with, or the one in already in use in the code base you're working in if the word has been used already.

Brian Campbell
Additionally, "functor" is common in C++ (the OP mentions boost) and could influence this "adaptor" pov.
Roger Pate
functer just sounds atrocious
aaa
A: 

I think you'll see "adapter" more commonly. Either is correct, so it's really up to you. The design pattern in particular seems to be spelled adapter. But, if you look at the wikipedia article on it (http://en.wikipedia.org/wiki/Adapter_pattern), it's spelled adaptor in the diagrams! Frankly, I don't see any justification for spelling the word adaptor in the first place, but English is a funny language that way.

Eric Mickelsen
"I don't see any justification for spelling the word adaptor". To some extent it's a Latin vs Germanic thing: actor, director, author, vs. player, leader, writer. The verb "adapt" is from the Latin verb, adaptare, so the Latin -tor suffix seems justified to me (if arbitrary, since the -er suffix means the same thing). But then I'm English, so I instinctively want to spell it adaptor anyway ;-)
Steve Jessop
That's a very good point. Is it possible though that this is nullified by the fact that the word comes to us via Middle French rather than being a direct Latin loan-word?
Eric Mickelsen