Is nillable(String.t) less boilerplate than String.t | nil ?

On Wednesday, February 28, 2018 at 9:12:42 AM UTC-5, Yordis Prieto wrote:
>
> I am more interested on the solution of `nil | t` I dont mind changing the 
> name to `nillable(t)` or whichever other word in English.
>
> The needs come from Ecto schemas and most of the struct fields will be 
> nillable(t), I thought it would be good to have something that represent 
> that common use case.
>
> On Tuesday, February 27, 2018 at 4:11:39 AM UTC-8, Yordis Prieto wrote:
>>
>> Introducing `maybe(t)` it will reduce the boilerplate code for `nil | 
>> something` 
>>
>> It is more convenience to write it this way, at least for me.
>>
>> What are your thoughts about it?  
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elixir-lang-core+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/c0d589bc-951d-4b5d-afef-d652d8a84310%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to