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
1.1k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
DSL Design - Best Practices (XtextCON 2015)
Sven Efftinge
May 20, 2015
More Decks by Sven Efftinge
See All by Sven Efftinge
Life of a Resource (XtextCON 2015)
svenefftinge
0
340
Future of Xtext (with Sebastian Zarnekow)
svenefftinge
0
19k
Other Decks in Technology
See All in Technology
国家プロジェクトを支える「さくらONE」 大規模LLM開発におけるGPU障害を乗り越えるクラスター運用戦略
gpuunite_official
0
260
SmartHR Engineering Team Deck
smarthr
1
3.6k
【CEDEC2026】Creative Approaches to Localizing the Dialects and Unique Speech of Umamusume: Pretty Derby Characters in English
cygames
PRO
4
26k
案件に一番詳しいAIを Amazon Bedrock AgentCore で作る ― 知見が知見を生むチームへ / Compounding Knowledge with AgentCore
yusukeshimizu
1
170
長期運営で肥大化したExcelマスターデータの解消に向けた移行事例
gree_tech
PRO
0
330
小粒でもパワフルなJS Runtime Antjsについて
comamoca
0
120
AI-DLC実践録_フルサイクル開発への挑戦
miyuc
0
390
20260817_生成AIの動向と中学校・高等学校での活用を考える_v1.00_公開用
doradora09
PRO
0
200
Genie Codeハンズオン応用編
taka_aki
0
140
DatadogのBits Chatが開発組織にもたらしたもの / What Bits Chat Has Brought Us
sms_tech
1
300
Adding Right-to-Left support to your web application with CSS logical properties — Lessons from Redmine
vividtone
0
170
【GCC2026】TrueHDRIを用いたルックデブ環境とライティングテクニック
bandainamcostudios
PRO
0
300
Featured
See All Featured
Writing Fast Ruby
sferik
630
63k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
640
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
3
480
Into the Great Unknown - MozCon
thekraken
41
2.7k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
300
エンジニアに許された特別な時間の終わり
watany
108
250k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
450
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
3k
RailsConf 2023
tenderlove
30
1.5k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
470
Leo the Paperboy
mayatellez
8
2.2k
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