josevalim

josevalim

Creator of Elixir

What's new in Elixir - Dec/17

See the post: https://elixir-lang.org/blog/2017/12/05/whats-new-in-elixir/

Kudos to @doomspork for starting the series!

First 10 of 27 Posts! Switch mode

amnu3387

amnu3387

Gives me 404 :dizzy_face:
It’s the trailing / on the link

josevalim

josevalim

Creator of Elixir

The link works fine here. Maybe it is something related to the CDN? Please try again soon!

AstonJ

AstonJ

Working fine here too :slight_smile:

Well done @doomspork - I am sure people are going to look forward to these updates :023:

JEG2

JEG2

Author of Designing Elixir Systems with OTP

In the last bullet, I believe “Steam” should be “Stream.”

Eiji

Eiji

@josevalim: Link url in HTML code on this page:

<a href="github.com/whatyouhide/stream_data">stream_data library</a>

Is interpreted in my browser as:

https://elixir-lang.org/blog/2017/12/05/whats-new-in-elixir/github.com/whatyouhide/stream_data

My browser: Vivaldi 1.14.1030.3 (latest snapshot) 64-bit

Where could I submit a bug and PR? :077:

Elixir is one of projects that I’m always waiting for next version. :smiley:

NobbZ

NobbZ

Disagreements about formatting are a thing of the past!

They aren’t as we still have the choice to not use the formatter.

I keep my stance, that shuffling comments (eg. comments on struct fields) and removing trailing commas is a bad idea. Also I’m not a friend of the uniform gap of a single line between different clauses of the same function and totally different functions.

Stream data and property testing will be joining Elixir core in a future release.

I’m looking forward into this!

ericmj

ericmj

Elixir Core Team

I think it’s implied that this is only when actually using the formatter.

dimitarvp

dimitarvp

Same here. I much prefer writing code like this:

defmodule X do
  def a(param1, param2 \\ nil)
  def a(param1, nil), do: ...
  def a(param2, param2), do: ...

  def b(whatever), do: ...
end

When scanning the code, this gives me an immediate clue that these 3 functions above are function header and two pattern-matched variants.

As @ericmj said, we’re not mandated to use the formatter of course, but I’d still expect the above to be the default.

DanCouper

DanCouper

Great that the dynamic supervisor sneaked in there. I was trying to implement one a month or so ago, and happened on the discussion on the Elixir repo from a year or so ago when the idea was floated, just assumed it had come to nothing and been shelved, it’ll be really useful to have that out of the box.

josevalim

josevalim

Creator of Elixir

I have fixed it. But a PR is definitely appreciated in the future, the repo is at GitHub - elixir-lang/elixir-lang.github.com: Website for Elixir · GitHub.

Please open up an issue about the comment shuffling on struct fields, I don’t believe this particular behaviour is desired. The other complaints had their pros and cons discussed elsewhere, so I won’t rehash them there. :slight_smile:

Ironically the code you wrote would be kept as is by the formatter. :slight_smile: The issue is with do/end blocks which is where most disagree in regards to the placement of newlines (and the formatter chose to add a newline before and after the block).

Last Post!

josevalim

josevalim

Creator of Elixir

Both are excellent links, thanks. The one shared by @kokolegorille explains how trailing commas are tricky for functions calls in Elixir. The one by @rmoorman is the general formatter rationale/feedback thread.

Where Next?

Trending in News Top

Other Trending Topics Top

JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge &amp; Solve. They are GUI (Emerge) and State management (S...
New
ausimian
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New
type1fool
I just stumbled on a newly redesigned elixir-lang.org. :tada: It looks like @Software_Mansion did the work, and I think it is generally a...
New
akoutmos
@hugobarauna and I (Alex Koutmos) have been hard at work on writing a book on Nerves that takes you from simply blinking LEDs to building...
New

We're in Beta

About us Mission Statement