# Elixir key-value 자료구조 함수 네이밍 규칙 - get, fetch, fetch!

> Clean Markdown view of GeekNews topic #22695. Use the original source for factual precision when an external source URL is present.

## Metadata

- GeekNews HTML: [https://news.hada.io/topic?id=22695](https://news.hada.io/topic?id=22695)
- GeekNews Markdown: [https://news.hada.io/topic/22695.md](https://news.hada.io/topic/22695.md)
- Type: news
- Author: [ohyecloudy](https://news.hada.io/@ohyecloudy)
- Published: 2025-08-24T14:22:34+09:00
- Updated: 2025-08-24T14:22:34+09:00
- Original source: [ohyecloudy.com](https://ohyecloudy.com/pnotes/archives/naming-elixir-get-fetch/)
- Points: 4
- Comments: 0

## Topic Body

-   Elixir에서 key-value 자료구조에서 값을 가져오는 함수가 3개  
    -   `get` - 없으면 default 값  
    -   `fetch` - {:ok, value} 형식으로 패턴매칭하기 좋게 리턴  
    -   `fetch!` - 없으면 에러를 내는 터프한 함수  
-   Erlang은 `get`, `find` 이름을 사용  
-   Erlang 네이밍 규칙이 더 마음에 든다  
    -   `get` 은 빠르게 값을 가져오고 `fetch` 는 DB나 웹에서 가져오는 식으로 이름을 붙여왔음

## Comments



_No public comments on this page._
