vonagam

vonagam

Discussion about changing default nullability in Ash 4

Hi, I’ve opened a discussion on Github whenever it makes sense to change the default for nullability in Ash 4.

Right now allow_nil? option for all fields has true as a default. And to me, based on what I’ve seen in codebases, it feels like a wrong one - it’s just a less strict option that needs opt-out more often than not and because of that introduces noise to code and decreases its readability. Also it is unintuitive (so often needs to be explained to first-time users) because it does not match Elixir or even Ash conventions.

Interested in your opinions:

a) Do you find nullability by default annoying or logical and convenient?

b) If you do prefer things to be other way around and it was up to you whenever such a breaking change is introduced in Ash 4 - would you still be in favor of making the change or choose to keep things as is (because, let’s say, it is not that important and to minimize changes)?

Most Liked

BartOtten

BartOtten

a.) rather not have nullability by default
b.) option flag in 3 defaulting to nillability, switching the default value in 4.

Igniter is probably not an option as we don’t know what user code relies on the current behaviour. (?)

zachdaniel

zachdaniel

Creator of Ash

The igniter script would go through and set the value of allow_nil?: true to all attributes that don’t have the option set to false, so resources would maintain their current behavior.

Where Next?

Popular in Discussions Top

andre1sk
A big advantage to Elixir is all the distributed goodness but for many applications running on multiple nodes having integrated Etcd, Zoo...
New
thojanssens1
It would be nice to be able to define a redirect from one route to another from the router.ex file. E.g.: redirect "/", UserController, ...
New
cvkmohan
The upcoming Phoenix 1.6 release looks very interesting. Became a habit to watch the commits - and - what they are bringing in. phx.gen...
New
Fl4m3Ph03n1x
Background A few days ago I was listening to The future of Elixir from Elixir Talks, with Dave Thomas (@pragdave ) and Brian Mitchell. I...
New
gausby
I asked this very same question on twitter and got some interesting feedback, but I thought it would be a good question to ask here as we...
1207 39247 209
New
Ankhers
Just a little information upfront. Generally speaking, if I feel like I need to either break a pipe chain or use an anonymous function in...
New
tmbb
This is a post to discuss the new Phoenix LiveView functionality. From Chris’s talk, it appears that they generate all HTML on the serve...
342 18122 126
New
fireproofsocks
I’ve been working on an Elixir project that has required a lot of scripting. I usually reach for Elixir because I like it more (and in th...
New
opsb
We’re considering our architecture from a viewpoint of scaling our traffic heavily over the next 6 months. Our current deployment is runn...
New
kostonstyle
Hi all How can I compare haskell with elixir, included tools, webservices, ect. Thanks
New

Other popular topics Top

Fl4m3Ph03n1x
About me? ( if you have nothing better to do than reading about some random guy in the internet :stuck_out_tongue: ) Hello all, this is ...
New
electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
New
ovidiubadita
Hey all, I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
freewebwithme
Using vs code and installed ElixirLS: support and debugger. And I got an error popped up on start up says Failed to run ‘elixir’ comma...
New
Lily
In templates/appointment/index.html.eex: <%= for appointment <- @appointments do %> <tr> <td><%= appoi...
New
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
axelson
This post is a wiki (feel free to hit the edit button near the bottom right of this post to add your own changes!) This post collects co...
239 47849 226
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New

We're in Beta

About us Mission Statement