This document introduces developing a domain specific language (DSL) in Scala for Apache Camel. It discusses using Scala features like implicit conversions, passing functions as parameters, and by-name parameters to build a DSL. It provides examples of simple routes in Java and Scala DSL and shows how concepts like filtering and content-based routing can be implemented. The document also covers Scala tooling integration with Maven and Eclipse and some caveats when mixing Java and Scala.
Refactoring to Scala DSLs and LiftOff 2009 RecapDave Orme
The document summarizes a presentation given on refactoring code to domain-specific languages (DSLs) in Scala. It provides an example of refactoring shell command execution code in Java into a DSL in Scala using techniques like implicit conversions and infix notation. The presentation argues that by applying Scala idioms carefully, code can be naturally refactored into a DSL tailored to the problem domain, providing a simple way to migrate code from Java to Scala.
This document provides an introduction to Scala by covering basic topics like packages, imports, classes, traits, control structures, and functions. It demonstrates Scala code for defining classes with fields, methods, and constructors. It shows how to use case classes, traits for composition, and for-comprehensions for iterating over collections. The document aims to highlight Scala's hybrid object-oriented and functional approach through code examples.
This document introduces developing a domain specific language (DSL) in Scala for Apache Camel. It discusses using Scala features like implicit conversions, passing functions as parameters, and by-name parameters to build a DSL. It provides examples of simple routes in Java and Scala DSL and shows how concepts like filtering and content-based routing can be implemented. The document also covers Scala tooling integration with Maven and Eclipse and some caveats when mixing Java and Scala.
Refactoring to Scala DSLs and LiftOff 2009 RecapDave Orme
The document summarizes a presentation given on refactoring code to domain-specific languages (DSLs) in Scala. It provides an example of refactoring shell command execution code in Java into a DSL in Scala using techniques like implicit conversions and infix notation. The presentation argues that by applying Scala idioms carefully, code can be naturally refactored into a DSL tailored to the problem domain, providing a simple way to migrate code from Java to Scala.
This document provides an introduction to Scala by covering basic topics like packages, imports, classes, traits, control structures, and functions. It demonstrates Scala code for defining classes with fields, methods, and constructors. It shows how to use case classes, traits for composition, and for-comprehensions for iterating over collections. The document aims to highlight Scala's hybrid object-oriented and functional approach through code examples.
Subversive talk - Eclipse Summit Europe 2008guestee71f
The document summarizes the status and recent milestones of the Subversive project, an Eclipse plugin for Subversion version control. It discusses the project becoming an official Eclipse project, its inclusion in the Ganymede release, and reaching over 1 million downloads in 2008. It also outlines new features and functionality added to areas like synchronization, checkout, commit, and merge capabilities, and lists the project's plans to migrate to a new team API and release 1.0 in June 2009.
This document provides an overview of the Scala programming language. Some key points:
- Scala runs on the Java Virtual Machine and was created by Martin Odersky at EPFL.
- It has been around since 2003 and the current stable release is 2.7.7. Release 2.8 beta 1 is due out soon.
- Scala combines object-oriented and functional programming. It has features like pattern matching, actors, XML literals, and more that differ from Java. Everything in Scala is an object.
36. 言語仕様の一次情報
• Scala Reference
– sbaz install scala-documentation
• The Scala Language Specification Version 2.8
– ChangeLogより抜粋
37. • Changes in Version 2.8.0
– Trailing commas
• Trailing commas in expression, argument, type or pattern sequences are no longer
supported.
• Changes in Version 2.8 (under development)
– Changed visibility rules for nested packages (where done?)
– Changed visibility rules in §2 so that packages are no longer treated specially.
– Added section §3.5.3 on weak conformance. Relaxed type rules for
conditionals,match expressions, try expressions to compute their result type
using least upper bound wrt weak conformance. Relaxed type rule for local type
inference so that argument types need only weekly conformto inferred formal
parameter types. Added section on numeric widening in §6.25 to support weak
conformance.
– Tightened rules to avpod (avoidのtypo?) accidential overrides in §5.1.4.
– Removed class literals.
– Added section §7.4 on context bounds.
– Clarified differences between isInstanceOf and pattern matches (§12.1).
– Allowed implicit modifier on function literals with a single parameter (§6.23).