axelson

axelson

Scenic Core Team

26) ElixirConf US 2018 Lightning Talk – Kernel functions you'll want to start using – Moxley Stratton

ElixirConf US 2018 Lightning Talk – Kernel functions you’ll want to start using – Moxley Stratton (@moxley)

All talks are available in the ElixirConf US 2018 Talks List or via the elixirconf2018 tag

First Post!

AstonJ

AstonJ

Nice talk!

I wonder how many people opt to use shortcuts like those mentioned?

Such as:

List.first(items)

vs

hd(items)

and:

Enum.count(items)

vs

length(items)

Most Liked

OvermindDL1

OvermindDL1

Depends on the types. List.first([]) will return nil but hd([]) will throw an error, and Enum.count(...) works on any enumerable and length/1 only works on lists (byte_size or bit_size for binaries and map_size for maps). Plus hd/length work in guards where the others do not.

But I use the type-specific forms when at all possible to help ensure proper types. :slight_smile:

Last Post!

blatyo

blatyo

Conduit Core Team

(post withdrawn by author, will be automatically deleted in 24 hours unless flagged)

Where Next?

Popular in Talks Top

axelson
ElixirConf 2017 - Cajoling the Bird: How we squeezed more out of Phoenix PubSub- Simon Zelazny Grindr is a m...
New
axelson
Posting a little bit late today but here you go: ElixirConf 2017 - Elixir + Neo4j - Regina Imhoff Neo4j is ...
New
axelson
ElixirConf 2017 - Closing Keynote - @chrismccord All talks are available in the Elixir Conf 2017 Talks List o...
New
New
Lawrence_elixir
@voltone - Security advocate, BEAM enthusiast Learn you some ‘ssl’ for much security! Talk in three words: TLS, security, troubleshooti...
New
rodrigues
Whether you’re developing a small web site or a large-scale distributed system, Erlang and Elixir are great tools for building server-sid...
New
JuanjoA
Hi, I don’t know if I have the post in the right place. I put here in case you might be interested, I am not the author, I just found it...
New

Other popular topics Top

Qqwy
Update: How to use the Blogs & Podcasts section You can post links to your blog posts or podcasts either in one of the Official Blog...
3271 130579 1222
New
Darmani72
If I have a post route which an argument: post /my_post_route/:my_param1, MyController.my_post_handler How would get the post params ...
New
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New
greenz1
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
New
gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID<0.412.0> terminating ** (Postgrex.Error) FATAL...
New

We're in Beta

About us Mission Statement