Post
Topic
Board Development & Technical Discussion
Re: minimalistic bitcoin client on D language?
by
wumpus
on 12/12/2010, 09:48:00 UTC
I'm only learning C++, but from what I could read, the having "templated" code in headers is a last resort.
That kind of explains it, you're still learning it. You can say one thing about the bitcoin code, namely is not beginner-friendly at all.

Quote
The preferred way to go is to instanciate your templates in your cpp files (so that you don't get linking errors)
That doesn't work at all for generic programming. You can instantiate for example vector, vector, but then you could only ever use those two.
If you want vector where X is any type to work you need to put the code for vector in a header. It's weird but C++ is designed like that. Again, look at Boost.

Anyway, IMO: there are more important things to worry about right now than Satoshi's code style. Such as building services that accept bitcoin.