DStep - Bindings Generator 0.0.1
Walter Bright
newshound2 at digitalmars.com
Sun Jul 8 11:42:19 PDT 2012
On 7/8/2012 4:13 AM, Jacob Carlborg wrote:
> How is this going to work, is it going to be an optional feature? I mean, this
> will add DStep (D and Clang) as dependencies to DMD.
I think that implicitly using the feature will depend on those programs being
available. It also means that any 3rd party can supply such a feature, to import
a file in any format.
> DStep is built to be used as a library, I can easily create a C API which can be
> used directly by DMD. No need for creating a new process. I can also make DStep
> give back the translate D code, no need for creating temporarily D files.
I think there are many advantages to DStep being a separate program, not the
least of which is debugging the output of it. Also, it means DStep could be
written in any language. For example, suppose a Go-to-D is proposed. Go provides
a Go library to parse Go code - so such a tool might be more easily written in
Go than in D.
> BTW, how would you indicate that the header file is an Objective-C file? Since
> both C and Objective-C uses the same extension for header files, this is
> required by Clang, otherwise it will treat the file as a C file.
Since OC is a proper superset of C, this shouldn't be a problem. Just run the OC
converter as your "C" compiler.
> In that project I had a tool for converting C/Objective-c headers to D modules.
> This tool was a Ruby script based on BridgeSupport. This is a complete rewrite
> of that tool. The whole project was called DStep and the name fit among other
> Objective-C related names like NeXTSTEP, OpenStep and GNUStep.
The name makes more sense now, but for marketing reasons it should give more of
a clue as to what it does.
More information about the Digitalmars-d-announce
mailing list