why smalltalk wins the host languages shootout

30
Why Smalltalk Wins the Host Languages Shutout Lukas Renggli and Tudor Gîrba http://scg.unibe.ch/research/helvetia

Upload: lukas-renggli

Post on 25-Dec-2014

440 views

Category:

Technology


2 download

DESCRIPTION

Integration of multiple languages into each other and into an existing development environment is a difficult task. As a consequence, developers often end up using only internal DSLs that strictly rely on the constraints imposed by the host language. Infrastructures do exist to mix languages, but they often do it at the price of losing the development tools of the host language. Instead of inventing a completely new infrastructure, our solution is to integrate new languages deeply into the existing host environment and reuse the infrastructure offered by it. In this presentation we show why Smalltalk is the best practical choice for such a host language.

TRANSCRIPT

Page 1: Why Smalltalk Wins the Host Languages Shootout

Why Smalltalk Wins the Host Languages Shutout

Lukas Renggli and Tudor Gîrbahttp://scg.unibe.ch/research/helvetia

Page 2: Why Smalltalk Wins the Host Languages Shootout

Marco Zanoli, cc-by-sa, 2.5, www.wikipedia.de, 2006

Page 3: Why Smalltalk Wins the Host Languages Shootout

Marco Zanoli, cc-by-sa, 2.5, www.wikipedia.de, 2006

Page 4: Why Smalltalk Wins the Host Languages Shootout

Multiple Context Specific Languages

Page 5: Why Smalltalk Wins the Host Languages Shootout

HomogeneousLanguage Integration

Page 6: Why Smalltalk Wins the Host Languages Shootout

Homogeneous Tool Integration

Page 7: Why Smalltalk Wins the Host Languages Shootout
Page 8: Why Smalltalk Wins the Host Languages Shootout

‣ C++

‣ C#

‣ Java

‣ Javascript

‣ Lisp

‣ Ruby

‣ Smalltalk

Page 9: Why Smalltalk Wins the Host Languages Shootout

1. Minimal Syntax

2. Dynamic Semantics

3. Reflective Facilities

4. Homogeneous Language

5. Homogeneous Tools

6. On-the-fly Programming

Page 10: Why Smalltalk Wins the Host Languages Shootout

1. Minimal Syntax

2. Dynamic Semantics

3. Reflective Facilities

4. Homogeneous Language

5. Homogeneous Tools

6. On-the-fly Programming

Page 11: Why Smalltalk Wins the Host Languages Shootout

1MinimalSyntax

Page 12: Why Smalltalk Wins the Host Languages Shootout

Abstract Type Declaration

Annotation

Annotation Binding

Annotation Type Declaration

Annotation Type Member Declaration

Anonymous Class Declaration

Array Access

Array Creation

Array Initializer

Array Type

Assert Statement

Assignment

Block

Block Comment

Body Declaration

Boolean Literal

Break Statement

Cast Expression

Catch Clause

Character Literal

Child List Property Descriptor

Child Property Descriptor

Class Instance Creation

Comment

Compilation Unit

Conditional Expression

Constructor Invocation

Continue Statement

Default Binding Resolver

Default Comment Mapper

Default Value Pair Binding

Do Statement

Doc Comment Parser

Empty Statement

Enhanced For Statement

Enum Constant Declaration

Enum Declaration

Expression

Expression Statement

Field Access

Field Declaration

For Statement

If Statement

Import Declaration

Infix Expression

Initializer

Instanceof Expression

Javadoc

Labeled Statement

Line Comment

Marker Annotation

Member Ref

Member Value Pair

Member Value Pair Binding

Message

Method Binding

Method Declaration

Method Invocation

Method Ref

Method Ref Parameter

Modifier

Name

Node Event Handler

Node Searcher

Normal Annotation

Null Literal

Number Literal

Package Binding

Package Declaration

Parameterized Type

Parenthesized Expression

Postfix Expression

Prefix Expression

Primitive Type

Qualified Name

Qualified Type

Recovered Type Binding

Recovered Variable Binding

Return Statement

Simple Name

Simple Property Descriptor

Simple Type

Single Member Annotation

Single Variable Declaration

Statement

String Literal

Structural Property Descriptor

Super Constructor Invocation

Super Field Access

Super Method Invocation

Switch Case

Switch Statement

Synchronized Statement

Tag Element

Text Element

This Expression

Throw Statement

Try Statement

Type

Type Binding

Type Declaration

Type Declaration Statement

Type Literal

Type Parameter

Variable Binding

Variable Declaration

Variable Declaration Expression

Variable Declaration Fragment

Variable Declaration Statement

While Statement

Wildcard Type

Page 13: Why Smalltalk Wins the Host Languages Shootout

^íoãiáëí

Page 14: Why Smalltalk Wins the Host Languages Shootout

Method

Pragma

Sequence

Message

Cascade

Block

Return

Variable

Assignment

Literal

Page 15: Why Smalltalk Wins the Host Languages Shootout

/.+@.+\..+/

Page 16: Why Smalltalk Wins the Host Languages Shootout
Page 17: Why Smalltalk Wins the Host Languages Shootout

0101001011

Page 18: Why Smalltalk Wins the Host Languages Shootout

3ReflectiveFacilities

Page 19: Why Smalltalk Wins the Host Languages Shootout

ReflectionÜbercool

Page 20: Why Smalltalk Wins the Host Languages Shootout

Meta-ProgrammingUntercool

Page 21: Why Smalltalk Wins the Host Languages Shootout

Parser parseExpression: aString , ' asRegex'

Page 22: Why Smalltalk Wins the Host Languages Shootout

MessageNode receiver: (LiteralNode value: aString) selector: #asRegex

Page 23: Why Smalltalk Wins the Host Languages Shootout

``(`,(aString) asRegex)

Page 24: Why Smalltalk Wins the Host Languages Shootout

``(`,(aString) asRegex)

Quasiquote /

Unquote

Page 25: Why Smalltalk Wins the Host Languages Shootout

``(`,(aString) asRegex)

Quasiquote /

Unquote

LISPer know this

Page 26: Why Smalltalk Wins the Host Languages Shootout

``(`,(aString) asRegex)

Represents AST of enclosed expression

Page 27: Why Smalltalk Wins the Host Languages Shootout

``(`,(aString) asRegex)

Expression executed

at run-time

Page 28: Why Smalltalk Wins the Host Languages Shootout

Lisp Smalltalk

Quasiquote ` ``

Unquote , `,

Splice ,@ `@

Page 29: Why Smalltalk Wins the Host Languages Shootout

Standard

Page 30: Why Smalltalk Wins the Host Languages Shootout

He vetiascg.unibe.ch/research/helvetia