Proposal: Database Engine for D

Wyatt via Digitalmars-d digitalmars-d at puremagic.com
Mon Jan 4 14:17:26 PST 2016


On Monday, 4 January 2016 at 20:07:55 UTC, Walter Bright wrote:
> On 1/4/2016 10:25 AM, Russel Winder via Digitalmars-d wrote:
>>
>> It is important that this works. But it should be possible to 
>> create an
>> operator algebra for any type: arithmetic types are a very 
>> small subset
>> of types used in computing.
>
> What do you suggest when the operators and precedence of the 
> desired algebraic type simply do not map cleanly onto C++ 
> operators and precedence grammar? Allow users to define their 
> own operators and redefine the precedence? Where is the line 
> that shouldn't be crossed?
>
On this point specifically, I'm still considering attempting to 
write a DIP because it would be very useful to have some 
user-defined operators available.  Take the OCaml/F# approach 
where they provide a set of acceptable characters for operators 
and define precedence automatically (depending on first character 
of the name).  (And definitely don't do the Haskell thing where 
any binary function can be turned into an infix op.)

-Wyatt


More information about the Digitalmars-d mailing list