“must be the introduction of mutability and OOP!” Hilarious
Elixir – HUGE Release Coming Soon
41–50 of 83 posts
Re: Elixir – HUGE Release Coming Soon
#42Earlier quoted context omitted.
Zero-arity functions are your externally visible module constants. :)
Sure, but I find it less readable and more verbose than your usual constants. Also you can't pattern match on a function return value IIRC. Or maybe I didn't find the right syntax, I get "invalid pattern in match" or "cannot invoke remote function inside a match" when pattern matching on function parameters. There's also solutions with macros, but why complicate something so simple :)
You definitely can. A function return value is just any other value and you can pattern match on it directly, or with the `case` or `with` constructs.
Re: Elixir – HUGE Release Coming Soon
#43I hope its a big update with static types
IIRC José recently said he was was gonna spend some time thinking about Elixir's approach to typing, so that's probably it. My hope is a smaller runtime that works well for CLI tools. I'd love to use Elixir for small scripts I'd ordinarily use Go/Python for.
That idea was that there should be a little language inside of each big language that is used to implement the self hosting aspects of the language, and then a small set of additional libraries would provide a usable embedded variant of the ecosystem, good for small places and things that have to start quickly.
Re: Elixir – HUGE Release Coming Soon
#44Earlier quoted context omitted.
Sure, but I find it less readable and more verbose than your usual constants. Also you can't pattern match on a function return value IIRC. Or maybe I didn't find the right syntax, I get "invalid pattern in match" or "cannot invoke remote function inside a match" when pattern matching on function parameters. There's also solutions with macros, but why complicate something so simple :)
> Also you can't pattern match on a function return value IIRC. You definitely can. A function return value is just any other value and you can pattern match on it directly, or with the `case` or `with` constructs.
Re: Elixir – HUGE Release Coming Soon
#45Any good guesses?
Re: Elixir – HUGE Release Coming Soon
#46Earlier quoted context omitted.
Sure, but I find it less readable and more verbose than your usual constants. Also you can't pattern match on a function return value IIRC. Or maybe I didn't find the right syntax, I get "invalid pattern in match" or "cannot invoke remote function inside a match" when pattern matching on function parameters. There's also solutions with macros, but why complicate something so simple :)
> Also you can't pattern match on a function return value IIRC. You definitely can. A function return value is just any other value and you can pattern match on it directly, or with the `case` or `with` constructs.
def foo(), do: "bar"
def foo(value), do: valueRe: Elixir – HUGE Release Coming Soon
#47Hi everyone! I want to align everyone expectations and say this is not related to the Elixir language itself but rather the Elixir ecosystem. The language has been stable for years and non-minor features always discussed upfront through several proposals. With that said, if you are interested on the work happening on types, I wrote recently about it here: https://elixir-lang.org/blog/2022/10/05/my-future-with-elixi..…
Re: Elixir – HUGE Release Coming Soon
#48Earlier quoted context omitted.
I thought so too, but Jose Valim says "never before seen on Elixir or the BEAM", while Gleam exists and Jose undoubtedly knows about that project: https://gleam.run/
Also meta has a static typing system for Erlang. Also, dialyzer exists. So if it's "never" he means set theoreic types, but there are incomplete set theoretic type libraries for elixir
Re: Elixir – HUGE Release Coming Soon
#49Re: Elixir – HUGE Release Coming Soon
#50He has been teasing this for a couple of months now. This cryptic twitter post[1] would suggets something related to nx[2] as numbat is their logo and that is the alt text on that tweet. The most out of the box thing I can think of is that one of the image generative models has been ported to elixir. That would be insane! That numbat twitter image is suspiciously 512x512. [1] https://twitter.com/josevalim/status/1583…