Re: [elixir-core:11883] Add strict option to Keyword.validate

2024-08-30 Thread Mateusz Front
d which value you should pass instead and what it is > used for! > > On Wed, Aug 28, 2024 at 11:30 Mateusz Front > wrote: > >> Hi, >> >> WDYT about adding a `strict: boolean` option to `Keyword.validate/2` that >> would make it return an error if a key th

[elixir-core:11882] Add strict option to Keyword.validate

2024-08-28 Thread Mateusz Front
Hi, WDYT about adding a `strict: boolean` option to `Keyword.validate/2` that would make it return an error if a key that doesn't have a default value provided is absent? The returned value in case of an error could be `{:error, unknown_keys, missing_keys}`, for example: {:error, [], [:b]} = K

Re: [elixir-core:10727] Re: Wrapper for receive block.

2022-01-25 Thread Mateusz Front
> Can you help me understand why the patterns themselves need to be passed to your `await` function? Because that way you can't `await` for a particular pattern ;) For example, we have a concept of playback states. One could need to wait until the playback state changes, so they could do `awai

Re: [elixir-core:10724] Re: Wrapper for receive block.

2022-01-24 Thread Mateusz Front
Hi there, we're preparing a message-based API as well, so one can use `receive` or `handle_info` when needed. However, we expect that functionality to be used mostly in elixir scripts/livebooks, where `await` is going to cover the majority of cases, saving us from having `receive` blocks everyw