3 ms·
With D it is: import sqlite3; This causes sqlite3.h to be read, lexed, parsed, and semantically analyzed to convert (where possible) C symbols to D symbol
by WalterBright 2y ago
With D it is:
import sqlite3;
This causes sqlite3.h to be read, lexed, parsed, and semantically analyzed to convert (where possible) C symbols to D symbols, and makes them available to the importer.
I've been sometimes pressured to instead use various more complicated syntaxes, but have held the line :-)
- WhereIsTheTruth 2y agoWhat i like to use is to isolate the imports from C, since they usually come with other definitions wich might clash (already defined error thingy): import c = sqlite3; On that topic, i wish it was possible to group named imports, perhaps this way: import c = sqlite3, miniz;