Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Ticket #902 (closed defect: duplicate)

Opened 4 years ago

Last modified 4 years ago

Tangobos / string / PhobosCompatibility

Reported by: baxissimo Assigned to: sean
Priority: major Milestone: 0.99.5
Component: Core Functionality Version: 0.99.4 Frank
Keywords: Cc:

Description

version=PhobosCompatibility? is now gone, but I think maybe it should be brought back to life.

The problem is that the promise of running Phobos code without modification using Tangobos is currently not attained. Any module that doesn't include std.compat but uses string,wstring,dstring, or Error will fail to compile with Tangobos.

Personally I think those aliases should just be included unconditionally in Tango's object.di for the sake of bridging the Phobos/Tango divide. Or someone needs to convince Walter to remove them from Phobos' object.d.

Yes by putting it in object.d 'string' et al become unofficial keywords. So what. For better or worse, they're part of D as far as I'm concerned, because Walter has declared it to be so. If you want to disagree with Walter on that point it's really not much different than the disagreement over toString/toUtf8. Tango has taken the huge step to be compatible there, so why not take this much smaller step and include the string aliases as well.

If that's unacceptable for some reason, then, as a compromise, I suggest bringing back -version=PhobosCompatibility? and defining the aliases in a version block in object.di. At least that will allow 99% of Phobos code to work unmodified using Tangobos.

I will say I don't really care about the printf prototype or the Error and bit aliases. I don't think anyone really thinks printf belongs in object.d. Error and there's no reason for anyone to use it because it's no different than Exception, and bit is long-long-deprecated and doesn't belong in Phobos at all.

However the string aliases are officially encouraged by Walter as the "right way" to write D code. So Tango should support those as well. At the very least in a version block.

Change History

02/14/08 08:37:11 changed by larsivi

  • status changed from new to closed.
  • resolution set to duplicate.
  • milestone changed from 0.99.6 to 0.99.5.

I think we should keep this within one ticket, #548.

02/14/08 10:19:42 changed by baxissimo

Sorry. I could have sworn I had already written this ticket but I couldn't find it. (That's because I wrote it as part of 548.)