The quoted sentence from the guide does seem a bit forward-looking.
As evidenced by all the documentation examples given for any of the new data structures, the current emphasis is on working with them in top level (interpreted) Wolfram Language code.
The goal is to eventually support also in FunctionCompile the same nice syntax shown in the question. This kind of integration is made easier by the fact that all of the data structures are implemented using the Compiler (and shipped in a compiled library form).
While there is an internal API for operating on data structures within compiled functions, at present it remains undocumented and subject to change.
For example, the code from the question would currently look like
cf = FunctionCompile[Function[Typed[ds, "BitVector"], Count[ds]]];
which performs an equivalent operation to ds["BitCount"]
len = 128;
ds = CreateDataStructure["BitVector", len];
Scan[ds["BitSet", #] &,
RandomInteger[len - 1, RandomInteger[len - 1]]];
{ds["BitCount"], cf[ds]}
(* {43, 43} *)
FunctionCompile
quite underwhelming: With quite an expansive syntax it manages to produce only suboptimally performing compiled functions. And the docs ofFunctionCompile
andDataStructure
in version 12.1 are so sparse that I do not have any hope that it will work any better. I doubt thatFunctionCompile
can serve any reasonable purpose at the moment. The symbols are still marked as [EXPERIMENTAL] in the docs, so we probalby have to wait for a later release. (I have to say that I don't have access to 12.1, yet). $\endgroup$ – Henrik Schumacher Mar 20 '20 at 12:11