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
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
親子 or ペアで Mashup for the Future! しゃべって楽しむ 初手AI駆動でものづくり体験
hiroramos4
PRO
0
100
マルチアカウント環境でSecurity Hubの運用!導入の苦労とポイント / JAWS DAYS 2026
genda
0
400
モブプログラミング再入門 ー 基本から見直す、AI時代のチーム開発の選択肢 ー / A Re-introduction of Mob Programming
takaking22
5
1.2k
kintone開発のプラットフォームエンジニアの紹介
cybozuinsideout
PRO
0
860
技術的負債の泥沼から組織を救う3つの転換点
nwiizo
8
3.5k
AWS DevOps Agent vs SRE俺 / AWS DevOps Agent vs me, the SRE
sms_tech
3
530
トップマネジメントとコンピテンシーから考えるエンジニアリングマネジメント
zigorou
4
830
僕、S3 シンプルって名前だけど全然シンプルじゃありません よろしくお願いします
yama3133
1
190
楽しく学ぼう!コミュニティ入門 AWSと人が つむいできたストーリー
hiroramos4
PRO
1
190
EMからICへ、二周目人材としてAI全振りのプロダクト開発で見つけた武器
yug1224
5
520
A Gentle Introduction to Transformers
keio_smilab
PRO
2
1k
「Blue Team Labs Online」入門 - みんなで挑むログ解析バトル
v_avenger
0
150
Featured
See All Featured
Designing Powerful Visuals for Engaging Learning
tmiket
0
270
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
330
Automating Front-end Workflow
addyosmani
1370
200k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
89
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.1k
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
62
51k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
1
150
Navigating Team Friction
lara
192
16k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
630
Game over? The fight for quality and originality in the time of robots
wayneb77
1
130
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
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