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
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
OpenTelemetry eBPF Instrumentationの舞台裏 / Behind the Scenes of OpenTelemetry eBPF Instrumentation
ymotongpoo
4
1.1k
Deploying a Full-Stack Bun-Native Framework on Cloudflare Workers
7nohe
0
140
Claude in Chrome 入門 / Introduction to Claude in Chrome
cielo1985
0
450
Adaptive Warehouse を今すぐ導入すべき理由と迷ったときの判断基準
__allllllllez__
0
200
リージョンの壁を越える、 ちょっと変わったAWSサービスの話
falken
PRO
1
310
Snowflakeで実現する全社横断の顧客の声(VOC)分析・活用基盤@Snowflake World Tour Tokyo 2026
yuto16
0
190
Screen Lens - 今見てる画面を翻訳する
komagata
0
250
Code4Lib JAPANカンファレンス2026 開会挨拶 / Code4Lib JAPAN Conference 2026: Opening Remarks
ykiyota
0
340
AIオーケストレーションを活用した 開発ワークフローの設計と実践
bqnq
0
140
Gitは怖い?共有ワークスペースから始めるSnowflakeチーム開発
coco_se
0
170
研究開発部の紹介 / Sansan R&D Profile
sansan33
PRO
5
25k
ペアプロの価値はコードを書くことだけじゃない
codmoninc
PRO
0
200
Featured
See All Featured
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.9k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.6k
Crafting Experiences
bethany
1
320
Exploring anti-patterns in Rails
aemeredith
3
500
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
590
Rebuilding a faster, lazier Slack
samanthasiow
85
9.6k
Evolving SEO for Evolving Search Engines
ryanjones
0
280
YesSQL, Process and Tooling at Scale
rocio
174
15k
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