Beeflang - open source performance-oriented compiled programming language

Basile B. b2.temp at
Thu Jan 9 20:38:31 UTC 2020

On Thursday, 9 January 2020 at 18:51:18 UTC, H. S. Teoh wrote:
> On Thu, Jan 09, 2020 at 04:58:16PM +0000, Basile B. via 
> Digitalmars-d wrote: [...]
>> A few good points however
>>   1. `??` and `?.` operators. D failed to get those.
> Wasn't there a proposal for the "Elvis operator" a while back? 
> Did nobody follow up on it with an actual DIP?  I would support 
> this. It's a pretty useful thing to have to not have to 
> continually check for null-ness in a long chain of dots. A 
> library solution is *possible* but ugly and has corner cases 
> that are not easily handled.

Yes there was an attempt by Razvan7 [1] and following a big 
discussion on the NG.
The attempt did not succeed because the implementation was, 
according to Walter, naive in the sense that there were cases 
where I don't remember what was doubly evaluated, leading to 
possible side-effects.

The attempt was for the Elvis so "?:" and not "??" (which makes 
less sense in D because of implicit bool eval of class instance, 
array, etc.).


More information about the Digitalmars-d mailing list