Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
value_struct
Search
J-_-L
November 03, 2012
Technology
110
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
value_struct
5-min introduction to read-only structs in Ruby
J-_-L
November 03, 2012
More Decks by J-_-L
See All by J-_-L
Why Ruby is "beautiful code"!
janlelis
2
2.3k
Other Decks in Technology
See All in Technology
AIテスト自動化と評価駆動開発EDD
happysamurai294
0
120
複雑な業務システムを高速でつくるため、チーム全員をつくれる人へ
ayakurabuchi
0
120
AX時代の自治体支援リソース再配分と役割分担の再構成:戦略とロードマップ(概要)
sishi2026
0
160
Draft AIエージェントの トークン消費を最小化する 8つの原則
kinopeee
6
1.9k
Deep Data Security 機能解説
oracle4engineer
PRO
3
980
素人でもできた!AIを使った短編小説創作入門
delhi09
PRO
0
280
Devin プロモコードの受け取りと適用(2026.10.27)
kinopeee
1
800
デザインレビューは自動化できるのか?─ Flutter × Figma で UI 品質保証を考える
techiro
2
710
1週間、Opus封印でお願いします
kintotechdev
1
420
OneLakeをデータソースにした AI Search(Foundry IQ)の ライフサイクル管理
ryuseiiida
0
220
構造で守らせる データ・法務・セキュリティ・開発チームとつくる AI時代のデータガバナンスとデータ基盤のリアル
legalontechnologies
PRO
3
710
ドメインエキスパートは いかにして AI を使って プロダクト開発をするか
tatsuyashiraishi
1
250
Featured
See All Featured
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
510
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.4k
What the history of the web can teach us about the future of AI
inesmontani
PRO
2
770
[SF Ruby Conf 2025] Rails X
palkan
3
1.5k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
3.1k
The SEO identity crisis: Don't let AI make you average
varn
0
620
The Curious Case for Waylosing
cassininazir
1
600
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
12k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
540
Tell your own story through comics
letsgokoyo
1
1.1k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.7k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
50
10k
Transcript
1/6 rbjl.net ValueStruct - Nov 3 2012 - Jan Lelis
d:evolute @happycode
2/6 rbjl.net ValueStruct Value structs behave like a normal Ruby
structs However, they are immutable*
3/6 rbjl.net ValueStruct: First Draft
4/6 rbjl.net ValueStruct: Benchmarks • Without mixins not much slower
than Struct
5/6 rbjl.net ValueStruct: Optional mixins • #dup takes a optional
hash for setting new values • Value structs can be initialized with the exact amount of arguments • Automatically freeze new instances • #to_h for converting into a hash • If Ruby version below 2.0
6/6 rbjl.net ValueStruct: Resources • gem install value_struct • https://github.com/janlelis/value_struct
• Other solutions • https://github.com/tcrayford/Values • https://github.com/iconara/immutable_struct • Twitter • @happycode • Contact • happycode.org / devolute.org