Why D is annoying =P

Era Scarecrow rtcvb32 at yahoo.com
Wed Oct 24 19:08:21 PDT 2012


On Thursday, 25 October 2012 at 01:50:05 UTC, Mehrdad wrote:
> Well I mean, yeah, you can obviously implement your own data 
> structures, and eventually, your own version of Phobos, even.
>
> The trouble is, then you're fighting the framework, and nothing 
> integrates with anything else. Some data structure expects a 
> toHash() instance method, another expects .hashOf, another 
> getHash(), another getHashCode(), another might say hashCode(), 
> and yet another might just expect a template specialization, 
> like in C++.
>
> So the point is, yes, it's possible. It's not that I can't work 
> around it, but it defeats the whole purpose of switching to D.


  I have no intention of writing a different version of phobos or 
breaking the framework. I'll work within the framework as much as 
possible; Working around the issues usually ends up force casting 
something so you can get the job done (but you still need to 
honor the type's original contract).

  I'll just hope my data processing won't require anything that's 
broken or going to be depreciated, I've already dropped using 
std.stream for ranges instead. Dropping classes in favor of 
structs.


More information about the Digitalmars-d mailing list