Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
value_struct
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
J-_-L
November 03, 2012
Technology
99
2
Share
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.2k
Other Decks in Technology
See All in Technology
2026-04-02 IBM Bobオンボーディング入門
yutanonaka
0
120
「活動」は激変する。「ベース」は変わらない ~ 4つの軸で捉える_AI時代ソフトウェア開発マネジメント
sentokun
0
140
OPENLOGI Company Profile
hr01
0
83k
AIエージェント時代に必要な オペレーションマネージャーのロールとは
kentarofujii
0
290
来期の評価で変えようと思っていること 〜AI時代に変わること・変わらないこと〜
estie
0
130
Tour of Agent Protocols: MCP, A2A, AG-UI, A2UI with ADK
meteatamel
0
200
自分をひらくと次のチャレンジの敷居が下がる
sudoakiy
5
1.7k
マルチモーダル非構造データとの闘い
shibuiwilliam
1
160
Databricks Lakebaseを用いたAIエージェント連携
daiki_akimoto_nttd
0
130
20260326_AIDD事例紹介_ULSC.pdf
findy_eventslides
0
450
ハーネスエンジニアリング×AI適応開発
aictokamiya
3
1.4k
Goビルドを理解し、 CI/CDの高速化に挑む
satoshin
0
110
Featured
See All Featured
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.6k
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
Designing for humans not robots
tammielis
254
26k
The Invisible Side of Design
smashingmag
302
51k
KATA
mclloyd
PRO
35
15k
First, design no harm
axbom
PRO
2
1.2k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
27
3.4k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
54k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
1.8k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
350
Evolving SEO for Evolving Search Engines
ryanjones
0
170
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.3k
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