Big integrals, opApply autoindex, safer integrals

Weed resume755 at mail.ru
Fri Dec 26 03:59:52 PST 2008


bearophile пишет:
> Recently we have discussed a lot about the balance of putting things
> inside the language or outside of it. It's a subtle balance and it's
> dynamic too, with time it can change (for example the removal of
> complex numbers from D2?). Surely it will need more discussions in
> the future too.
> 
> In the past I have discussed about the uses of multi-precision
> integral numbers. They can be put inside the std lib (std.bigint) or
> inside the compiler (many other languages, etc).
> 
> But there's another intermediate solution regarding those
> multi-precision numbers: keep them outside the language but allow the
> language to manage them with a transparent syntax. So even if the
> compiler doesn't know how to add two of such numbers (and you have to
> load such operations from a module), the syntax of the language
> allows you to write:
> 
> import bigints: Bigint; ... Bigint x =
> 71_459_266_416_693_160_362_545_788_781_600;
> 
> Instead of: BigInt x = "71459266416693160362545788781600";
> 
> This keeps the implementation of the operations outside the compiler,
> keeping it simpler and allowing different implementations, for
> example using bindings to the GNU multiprecision, and allows the user
> to manage such numbers in a transparent way, as (or almost as) they
> were built-in in the language.
> 

It is not enough to make Bigint the object?



More information about the Digitalmars-d mailing list