spir:

> But I guess optionality could, and should, extend to non-ref types; thus, null
> is just a particular case of non-existence. And this would apply especially on
> function parameters:
>    void f (int i?) {...}

>From C# experience it seems non-ref nullable types are not so useful (and it's 
>not hard to implement them with the language itself).


> Also, they should reuse '?' to mean 'exists', possibly '!?' meaning the 
> opposite:
>     void f (int i?) {
>     if (? i) doWithI(i);
>     if (!? i) doWithoutI();
>     ...
> }

Better to keep the language less perlish.


> great! get rid of new in D as well

This was discussed a lot. I don't have much interest in this change.


>> We may define a class method "by reference":
>>
>> void hello(String name) = hello;
>
> ???

The second hello is a function reference. Nothing so interesting to see here.


> I don't get the diff between currying & partial app.

Take a look at the wikipedia pages, the difference is small, they are quite 
related things, their difference is no so important:
http://en.wikipedia.org/wiki/Currying
http://en.wikipedia.org/wiki/Partial_application


> And find this feature much complication for close to uselessness.

In functional-style programming it's useful to be able to curry (or partially 
applicate) functions, it helps keep the code shorter and less noisy.


> examples?

See the first PDF at those pages. In the meantime people have mirrored those 
PDFs, see the Reddit thread.


> Yo; and while you're at "typestating", extend the feature to any type (not 
> only
> pointers).

For this you may need to look for a language (Rust) designed for the ground up 
for this feature.

Bye,
bearophile

Reply via email to