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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Sven Efftinge
May 20, 2015
Technology
1.1k
0
Share
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
330
Future of Xtext (with Sebastian Zarnekow)
svenefftinge
0
19k
Other Decks in Technology
See All in Technology
ARIA Notifyについて
ryokatsuse
1
120
Azure Static Web Apps の自動ビルドがタイムアウトしやすくなった状況に対応した件/global-azure2026
thara0402
0
420
ワールドカフェI /チューターを改良する / World Café I and Improving the Tutors
ks91
PRO
0
320
「誰一人取り残されない」 AIエージェント時代のプロダクト設計思想 Product Management Summit 2026
mizushimac
1
220
Choose your own adventure in agentic design patterns
glaforge
0
140
Rapid Start: Faster Internet Connections, with Ruby's Help
kazuho
2
640
コミュニティ・勉強会を作るのは目的じゃない
ohmori_yusuke
0
230
Hacobu Tech Deck
hacobu
PRO
0
110
自分のハンドルは自分で握れ! ― 自分のケイパビリティを増やし、メンバーのケイパビリティ獲得を支援する ― / Take the wheel yourself
takaking22
1
920
最初の一歩を踏み出せなかった私が、誰かの背中を押したいと思うようになるまで / give someone a push
mii3king
0
160
[最強DB講義]推薦システム | 基礎編
recsyslab
PRO
1
170
AWS DevOps Agentはチームメイトになれるのか?/ Can AWS DevOps Agent become a teammate
kinunori
6
750
Featured
See All Featured
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
150
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
Context Engineering - Making Every Token Count
addyosmani
9
830
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
Site-Speed That Sticks
csswizardry
13
1.2k
A Modern Web Designer's Workflow
chriscoyier
698
190k
For a Future-Friendly Web
brad_frost
183
10k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
100
Evolving SEO for Evolving Search Engines
ryanjones
0
180
Information Architects: The Missing Link in Design Systems
soysaucechin
0
890
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
320
Rebuilding a faster, lazier Slack
samanthasiow
85
9.5k
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