Developing a plan for D2.0: Getting everything on the table

Lutger lutger.blijdestijn at gmail.com
Tue Jul 14 16:48:44 PDT 2009


bearophile wrote:

> Lutger:
>>Can't nullable / non-nullable be done in library?<
> 
> Yes, of course, people in the Scheme language have shown that you can do
> almost everything in library code. But to do that you need (beside fixing
> D library code, because the default now becomes non-null object
> references) a "pluggable type system", that is you must be able to plug-in
> a new piece of type system.
> 
> You can do that with a meta (programmable) type-system like Haskell one,
> or with some kind of true plug-in (think about the "neutral"
> function/argument type annotations of Python3, that are a simple example
> of machinery that can be used to plug-in a library defined type system). I
> don't see both such things to be added to D2 anytime soon because they are
> complex, quite more complex than nonnullable object references.
> 
> So I'm looking for just the ""small"" change in the type system plus the
> short leading "?" syntax.
> 
> If D developers aren't interested in such thing, then a DEP can be written
> and then marked as officially refused, to avoid wasting future time
> discussing about this idea (this is another quite important purpose of
> Python PEPs, to mark ideas as refused and avoid discussing something
> hopeless over and over again).
> 
> Bye,
> bearophile

Isn't .C#'s Nullable<T> a library thing? (It's quite useful for database 
crap)

I mean, it's not as ambitious as non-nullable by default, but couldn't we 
develop a Nullable and NonNullable template with the tools we have today in 
D? (I'm not sure). Would that be good enough?







More information about the Digitalmars-d mailing list