This is a great syntax and I am doing this :p.
But there are many many many many issues associated with this (I
mentioned that I wanted them natively, templates are problems).
The library needed a significant coding and still to match with
immutable, support from phobos - it is tough.
Just a twist :
unsigned bits(179:0) a ;
unsigned bits(179:0) b ;
unsigned bits(190:0) result = a + b ;
OR
unsigned bits(108826676:0) result = a + b ;
Regards, Sumit
On Monday, 6 January 2014 at 09:41:12 UTC, bearophile wrote:
Sumit Adhikari:
unsigned bits(179:0) a ;
unsigned
Sumit Adhikari:
unsigned bits(179:0) a ;
unsigned bits(179:0) b ;
unsigned bits(179:0) result = a + b ;
What about this syntax:
UnsignedBits!(179, 0) a, b;
UnsignedBits!(179, 0) result = a + b;
Or better:
alias ubits = UnsignedBits!(179, 0)
ubits a, b;
ubits result = a + b;
Bye,
On Monday, 6 January 2014 at 10:31:46 UTC, Sumit Adhikari wrote:
Again a library will not allow me to extract last drop from my
HW - for every library and everybody :). The internal
implementation of these libraries are memory hungry and not
embedded systems friendly.
I challenge this
06-Jan-2014 14:31, Sumit Adhikari пишет:
This is a great syntax and I am doing this :p.
But there are many many many many issues associated with this (I
mentioned that I wanted them natively, templates are problems). The
library needed a significant coding and still to match with immutable,
Too bad that I cannot reply all.
Dear people,
Requesting for a domain specific data type is not a sin :D.
If there can be support for arbitrary precision floating point
number, then there can be arbitrary precision bit-vector :D.
Libraries are good, but they depends on library writer! that's
The birth and evolution of d language is to provide a modern and
better alternative to C++! If I look at C++ then C++ is a systems
programming language. The use cases of C++ is OS and embedded
systems writing. Why? C++ claims to extract last drop out of HW.
If I
look correctly rarely C++ is