Pluggable type sytems

2009-01-18 Thread bearophile
I think pluggable type systems will become more common in the following years (see also the optional annotations of Python3 that are designed for that too). This is more or less related: http://bartoszmilewski.wordpress.com/2009/01/18/java-pluggable-types/ (but nonnullability is so basic that i

Re: Pluggable type sytems

2009-01-20 Thread Denis Koroskin
On Mon, 19 Jan 2009 16:26:47 +0300, Michel Fortin wrote: On 2009-01-18 21:29:02 -0500, bearophile said: I think pluggable type systems will become more common in the following years (see also the optional annotations of Python3 that are designed for that too). This is more or less relate

Re: Pluggable type sytems

2009-01-20 Thread bmeck
> In fact, I'd even argue that non-nullability should be the default for > pointers and class references Not against it for class references, but utterly against it for pointers as that is one of main points of using a pointer to me. Using structs, classes, primitive variables, and arrays I wou

Re: Pluggable type sytems

2009-01-21 Thread bearophile
Michel Fortin: > I agree for non-nullability. More discussions about this topic: http://lambda-the-ultimate.org/node/1478 A very C-like language with such features (it's a language different from Cyclone): http://www.splint.org/manual/manual.html#null Bye, bearophile

Re: Pluggable type sytems

2009-01-22 Thread Nick Sabalausky
nalysis nice-ity, and @PolyNull (which has been proposed here...often). Although I wonder...maybe @PolyNull should be the default (wherever applicable) instead of @Nullable or @NonNull? (Or maybe I'm overlooking some obvious problem with that.) I see pluggable type sytems as potentially bei

Re: Pluggable type sytems

2009-02-08 Thread Bartosz Milewski
I also believe that non-null should be the default. Most references in a typical program are assumed to be non-null. Like for every default, there should be an escape mechanism from it. However, adding "nullable" to the type system might be controversial, especially because it requires special

Re: Pluggable type sytems

2009-02-08 Thread Robert Fraser
Bartosz Milewski wrote: I also found out that Java's editor, Eclipse, enforces DII--a very useful feature that paid off for me in the first 100 lines of code I wrote after a long period of inactivity in Java ;-) The Java spec does, actually. Eclipse JDT just reports compiler errors as you type

Re: Pluggable type sytems

2009-02-08 Thread Bartosz Milewski
Shows you what a beginner in Java I am. Again and again I keep reinventing the wheel. That settles it--we have to have it in D! Robert Fraser Wrote: > Bartosz Milewski wrote: > > I also found out that Java's editor, Eclipse, enforces DII--a very useful > > feature that paid off for me in the f

Re: Pluggable type sytems

2009-02-08 Thread bearophile
Bartosz Milewski: > I also believe that non-null should be the default. That' probably right. And you can add ? to the things that can be null. Better to let the type system deal with this. Bye, bearophile

Re: Pluggable type sytems

2009-02-08 Thread Denis Koroskin
On Mon, 09 Feb 2009 01:19:55 +0300, Bartosz Milewski wrote: I also believe that non-null should be the default. Most references in a typical program are assumed to be non-null. Oh, that's true! Like for every default, there should be an escape mechanism from it. However, adding "nullab

Re: Pluggable type sytems

2009-02-08 Thread Bartosz Milewski
I just assume that any extension of the already complex D type system will be met with a lot of resistance. I remember the all-out wars about const and immutable (a.k.a invariant). Even those extensions are still half-assed: the construction of immutable objects and const polymorphism issues rem

Re: Pluggable type sytems

2009-02-08 Thread Denis Koroskin
On Mon, 09 Feb 2009 04:09:26 +0300, Bartosz Milewski wrote: I just assume that any extension of the already complex D type system will be met with a lot of resistance. I remember the all-out wars about const and immutable (a.k.a invariant). Even those extensions are still half-assed: the

Re: Pluggable type sytems

2009-02-09 Thread Danny Wilson
Op Mon, 09 Feb 2009 02:25:55 +0100 schreef Denis Koroskin <2kor...@gmail.com>: On Mon, 09 Feb 2009 04:09:26 +0300, Bartosz Milewski wrote: ... My impression is that theoreticians and very advanced programmers love elaborate type systems. Nine-to-five programmers, which are in the m

Re: Pluggable type sytems

2009-01-19 Thread Michel Fortin
On 2009-01-18 21:29:02 -0500, bearophile said: I think pluggable type systems will become more common in the following years (see also the optional annotations of Python3 that are designed for that too). This is more or less related: http://bartoszmilewski.wordpress.com/2009/01/18/java-plugg