axelson

axelson

Scenic Core Team

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

Showing Posts 1 to 2

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)
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:

— All posts loaded —

Where Next? Top

Trending in Talks Top

CodeSync
Keynote: What Comes Next - Chris McCord | ElixirConf US 2026 https://www.youtube.com/watch?v=wR9O_MiwZ-8 Comments welcome! View the <s...
New
CodeSync
LT: Proof Driven Development - Gideon Keith-Stanley | ElixirConf US 2026 Comments welcome! View the <span class="hashtag-...
New
CodeSync
Update from the Nerves Core Team - Jon Carstens | ElixirConf US 2026 https://www.youtube.com/watch?v=7VbPvlKxF9k Comments welcome! Vie...
New
CodeSync
Union of the Snake - Parker Selbert &amp; Shannon Selbert | ElixirConf EU 2026 https://www.youtube.com/watch?v=hRa8ACrTVDs Comments we...
New
CodeSync
Update from the Erlang Ecosystem Foundation - Dan Janowski | ElixirConf US 2026 Comments welcome! View the <span class="h...
New
CodeSync
Bringing LiveView to the Client with Popcorn - Franciszek Kubis | ElixirConf EU 2026 https://www.youtube.com/watch?v=dZYrPTdCVeo Comme...
New
CodeSync
Hologram: Building Local-First Apps in Pure Elixir | Bart Blast https://www.youtube.com/watch?v=jdg_UrLp0bU Comments welcome! View the...
New

Other Trending Topics Top

GenericJam
Edit: 2026 May 15 - This post is archived. Mob is alive!! Main docs: mob v0.7.11 — Documentation A bit of explanation for the slightly c...
261 13183 112
New
mudasobwa
I fully migrated to my own harness from Anthropic/Gemini and I think it’s time to share it. Welcome DSH, the DeepSeek Harness, fully writ...
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
charlenopires
Hi everyone :waving_hand: I’ve been working on PhiaUI, an open-source UI component library for Phoenix LiveView, and I wanted to share i...
New
PJUllrich
On November 23, 2026, an unauthorized third party exploited a vulnerability in hex.pm (CVE-2026-129514, CVSS 10.0) that let them run comm...
New
akoutmos
@hugobarauna, Dr. Dimitrios Koutmos (my brother) and I (Alex Koutmos) have been hard at work on writing a book on how you can use Elixir ...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews