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
DSL Design - Best Practices (XtextCON 2015)
Search
Sven Efftinge
May 20, 2015
Technology
0
1.1k
DSL Design - Best Practices (XtextCON 2015)
Sven Efftinge
May 20, 2015
Tweet
Share
More Decks by Sven Efftinge
See All by Sven Efftinge
Life of a Resource (XtextCON 2015)
svenefftinge
0
320
Future of Xtext (with Sebastian Zarnekow)
svenefftinge
0
19k
Other Decks in Technology
See All in Technology
楽しく学ぼう!ネットワーク入門
shotashiratori
3
2.4k
Kaggleの経験が実務にどう活きているか / kaggle_findy
sansan_randd
7
1.4k
開発組織の課題解決を加速するための権限委譲 -する側、される側としての向き合い方-
daitasu
5
560
越境する組織づくり ─ 多様性を前提にしたチームビルディングとリードの実践知
kido_engineer
2
180
組織全体で実現する標準監視設計
yuobayashi
2
470
モブプログラミング再入門 ー 基本から見直す、AI時代のチーム開発の選択肢 ー / A Re-introduction of Mob Programming
takaking22
5
1.3k
決済サービスを支えるElastic Cloud - Elastic Cloudの導入と推進、決済サービスのObservability
suzukij
2
590
GitLab Duo Agent Platform + Local LLMサービングで幸せになりたい
jyoshise
0
280
[JAWSDAYS2026]Who is responsible for IAM
mizukibbb
0
370
EMからICへ、二周目人材としてAI全振りのプロダクト開発で見つけた武器
yug1224
5
520
非情報系研究者へ送る Transformer入門
rishiyama
11
7k
JAWS DAYS 2026 楽しく学ぼう!ストレージ 入門
yoshiki0705
2
140
Featured
See All Featured
Agile that works and the tools we love
rasmusluckow
331
21k
Thoughts on Productivity
jonyablonski
75
5.1k
Music & Morning Musume
bryan
47
7.1k
sira's awesome portfolio website redesign presentation
elsirapls
0
190
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
210
From π to Pie charts
rasagy
0
150
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
3.7k
Claude Code のすすめ
schroneko
67
220k
RailsConf 2023
tenderlove
30
1.4k
Optimising Largest Contentful Paint
csswizardry
37
3.6k
Into the Great Unknown - MozCon
thekraken
40
2.3k
Transcript
DSL DESIGN Sven Efftinge
Why an External DSL • Write the thing you care
in the way you want • Have compile time feedback, that understand your domain • Be cross platform / platform independent
DSL Design != GPL Design
A Good DSL makes editing simpler makes reading simpler improves
stakeholder communication uses a familiar syntax nicely integrates into workflow tools and execution are fast is highly maintainable
DSL A Powerful Programming Interface User Interface
Who does What Requirements Engineering
Use Existing Domain Terminology
Use Familiar SYNTAX
When To Sugar Be explicit and regular unless the concept
is used often and well known
Never Change
class { visibility=public name="HelloWorld" members = [ method { visibility=public
static=true returnType=void name="main" parameters = [ parameter { type = String varArgs = true name = args } ] ... } ] } public class HelloWorld { public static void main(String... args) { System.out.println("Hello World"); } } Generic vs. Specific
Business Readable DSLs
Use Structure, use Whitespace
Be Regular
Keywords First reduces look ahead for the parser &
the reader visual anchor
Good Defaults
Multiple Files FTW a package or namespace is a logical
container but not necessarily a physical! improves collaboration
Names! Simple name clashes are rare We think in names
No more UUIDs!
Loose Grammar
Strict Validation
you ain’t gonna need it
Don’t Reinvent Expressions
Invasiveness • The outside view must only change when
the file changes physically • Bad Example: Xtend return types
Dynamic Scoping Never!
Preprocessors Nooo!
N-to-1 Code Generation source source generated No more incremental builds!
OutOfMemoryException!
Questions