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
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
Oracle Cloud Infrastructure(OCI):Onboarding Session(はじめてのOCI/Oracle Supportご利⽤ガイド)
oracle4engineer
PRO
2
17k
トイルを超えたCREは何屋になるのか
bengo4com
0
120
OpenClaw初心者向けセミナー / OpenClaw Beginner Seminar
cmhiranofumio
0
250
ハーネスエンジニアリング×AI適応開発
aictokamiya
3
1.4k
LLMに何を任せ、何を任せないか
cap120
11
6.9k
Databricks Lakebaseを用いたAIエージェント連携
daiki_akimoto_nttd
0
130
Oracle AI Database@Azure:サービス概要のご紹介
oracle4engineer
PRO
5
1.3k
Databricks Appsで実現する社内向けAIアプリ開発の効率化
r_miura
0
230
昔話で振り返るAWSの歩み ~S3誕生から20年、クラウドはどう進化したのか~
nrinetcom
PRO
0
140
Even G2 クイックスタートガイド(日本語版)
vrshinobi1
0
190
BFCacheを活用して無限スクロールのUX を改善した話
apple_yagi
0
140
マルチモーダル非構造データとの闘い
shibuiwilliam
1
150
Featured
See All Featured
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.6k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Context Engineering - Making Every Token Count
addyosmani
9
790
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
140
Ethics towards AI in product and experience design
skipperchong
2
250
Large-scale JavaScript Application Architecture
addyosmani
515
110k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
280
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.4k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
290
The Cost Of JavaScript in 2023
addyosmani
55
9.8k
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
500
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
230
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