On Tuesday, 8 May 2012 at 21:17:21 UTC, Sean Kelly wrote:
On May 8, 2012, at 9:35 AM, foobar wrote:

On Tuesday, 8 May 2012 at 14:59:43 UTC, Lars T. Kyllingstad wrote:
On Tuesday, 8 May 2012 at 14:48:27 UTC, foobar wrote:
[...], what if I find it useful to use e.g. FORTRAN code, should the relevant functions also be in the stdlib?

No, FORTRAN has absolutely nothing to do with D. C, on the other hand, does. Both druntime and Phobos depend heavily on the C stdlib. The GC uses malloc/free, std.stdio.File is a wrapper around FILE*, etc.

Irrelevant. For all I care druntime could be implemented in Klingon. That doesn't mean its API needs to include Klingon as well. That's called "encapsulation".

This is difficult to do with the module system. You'd have to hand-craft .di files with the stdc headers left out to avoid bundling them in the distro. They could go into core.internal I suppose though.

Having an internal package is a good idea. Don did the same for the Math code. More over, the general issue with the module system should be fixed. There was a recent discussion about Andrei's DIP, precisely about addressing this problem.


Reply via email to