The document summarizes the evolution of the Scala programming language from its origins to its present state and future directions. It discusses Scala's combination of object-oriented and functional programming, its type system, tooling improvements, and the emergent ecosystem around Scala. It also outlines plans to develop a Scala-specific platform called TASTY and explore new language concepts like effect systems to model side effects through capabilities.
This was a short introduction to Scala programming language.
me and my colleague lectured these slides in Programming Language Design and Implementation course in K.N. Toosi University of Technology.
Scala - The Simple Parts, SFScala presentationMartin Odersky
These are the slides of the talk I gave on May 22, 2014 to the San Francisco Scala user group. Similar talks were given before at GOTO Chicago, keynote, at Gilt Groupe and Hunter College in New York, at JAX Mainz and at FlatMap Oslo.
This was a short introduction to Scala programming language.
me and my colleague lectured these slides in Programming Language Design and Implementation course in K.N. Toosi University of Technology.
Scala - The Simple Parts, SFScala presentationMartin Odersky
These are the slides of the talk I gave on May 22, 2014 to the San Francisco Scala user group. Similar talks were given before at GOTO Chicago, keynote, at Gilt Groupe and Hunter College in New York, at JAX Mainz and at FlatMap Oslo.
Slides from my talk at the Feb 2011 Seattle Tech Startups meeting. More info here (along with powerpoint slides): http://www.startupmonkeys.com/2011/02/scala-frugal-mechanic/
The talk covers foundations and applications of implicit function types. It is an updated and more condensed version of the "What to Leave Implicit Talk" given at CurryOn/PLDI 2017.
Introduction to Scala | Big Data Hadoop Spark Tutorial | CloudxLabCloudxLab
Big Data with Hadoop & Spark Training: http://bit.ly/2IXKBvs
This CloudxLab Introduction to Scala tutorial helps you to understand Scala in detail. Below are the topics covered in this tutorial:
1) Scala - Scalable Language
2) Why Scala?
3) Scala - History
4) Scala - Hello World - Example
5) Scala - Hello World - Compiling and Running
6) Variables in Scala
7) Immutable variables
8) Type inference in Scala
9) Classes in Scala
10) Singleton Objects in Scala
11) Scala - If - else
12) Loops in Scala - while, do - while and for loops
13) Different ways of representing functions in Scala
14) Scala Collections
15) Sequences - Array & List
16) Scala Collections - Sets, Tuples and Maps
17) Higher Order Functions in Scala - map, flatMap, filter, foreach and reduce
18) Interaction with Java
19) SBT - Build Tool in Scala
20) SBT Demo
21) Case Classes in Scala
Weaving Dataflows with Silk - ScalaMatsuri 2014, TokyoTaro L. Saito
Silk is a framework for building dataflows in Scala. In Silk users write data processing code with collection operators (e.g., map, filter, reduce, join, etc.). Silk uses Scala Macros to construct a DAG of dataflows, nodes of which are annotated with variable names in the program. By using these variable names as markers in the DAG, Silk can support interruption and resume of dataflows and querying the intermediate data. By separating dataflow descriptions from its computation, Silk enables us to switch executors, called weavers, for in-memory or cluster computing without modifying the code. In this talk, we will show how Silk helps you run data-processing pipelines as you write the code.
Slides from my talk at the Feb 2011 Seattle Tech Startups meeting. More info here (along with powerpoint slides): http://www.startupmonkeys.com/2011/02/scala-frugal-mechanic/
The talk covers foundations and applications of implicit function types. It is an updated and more condensed version of the "What to Leave Implicit Talk" given at CurryOn/PLDI 2017.
Introduction to Scala | Big Data Hadoop Spark Tutorial | CloudxLabCloudxLab
Big Data with Hadoop & Spark Training: http://bit.ly/2IXKBvs
This CloudxLab Introduction to Scala tutorial helps you to understand Scala in detail. Below are the topics covered in this tutorial:
1) Scala - Scalable Language
2) Why Scala?
3) Scala - History
4) Scala - Hello World - Example
5) Scala - Hello World - Compiling and Running
6) Variables in Scala
7) Immutable variables
8) Type inference in Scala
9) Classes in Scala
10) Singleton Objects in Scala
11) Scala - If - else
12) Loops in Scala - while, do - while and for loops
13) Different ways of representing functions in Scala
14) Scala Collections
15) Sequences - Array & List
16) Scala Collections - Sets, Tuples and Maps
17) Higher Order Functions in Scala - map, flatMap, filter, foreach and reduce
18) Interaction with Java
19) SBT - Build Tool in Scala
20) SBT Demo
21) Case Classes in Scala
Weaving Dataflows with Silk - ScalaMatsuri 2014, TokyoTaro L. Saito
Silk is a framework for building dataflows in Scala. In Silk users write data processing code with collection operators (e.g., map, filter, reduce, join, etc.). Silk uses Scala Macros to construct a DAG of dataflows, nodes of which are annotated with variable names in the program. By using these variable names as markers in the DAG, Silk can support interruption and resume of dataflows and querying the intermediate data. By separating dataflow descriptions from its computation, Silk enables us to switch executors, called weavers, for in-memory or cluster computing without modifying the code. In this talk, we will show how Silk helps you run data-processing pipelines as you write the code.
A presentation at Twitter's official developer conference, Chirp, about why we use the Scala programming language and how we build services in it. Provides a tour of a number of libraries and tools, both developed at Twitter and otherwise.
A full Machine learning pipeline in Scikit-learn vs in scala-Spark: pros and ...Jose Quesada (hiring)
The machine learning libraries in Apache Spark are an impressive piece of software engineering, and are maturing rapidly. What advantages does Spark.ml offer over scikit-learn? At Data Science Retreat we've taken a real-world dataset and worked through the stages of building a predictive model -- exploration, data cleaning, feature engineering, and model fitting; which would you use in production?
The machine learning libraries in Apache Spark are an impressive piece of software engineering, and are maturing rapidly. What advantages does Spark.ml offer over scikit-learn?
At Data Science Retreat we've taken a real-world dataset and worked through the stages of building a predictive model -- exploration, data cleaning, feature engineering, and model fitting -- in several different frameworks. We'll show what it's like to work with native Spark.ml, and compare it to scikit-learn along several dimensions: ease of use, productivity, feature set, and performance.
In some ways Spark.ml is still rather immature, but it also conveys new superpowers to those who know how to use it.
ScalaDays 2013 Keynote Speech by Martin OderskyTypesafe
Scala gives you awesome expressive power, but how to make best use of it? In my talk I will discuss the question what makes good Scala style. We will start with syntax and continue with how to name things, how to mix objects and functions, where (and where not) to use mutable state, and when to use which design pattern. As most questions of style, the discussion will be quite subjective, and some of it might be controversial. I am looking forward to discuss these topics with the conference attendees.
My presentation at Sulake (www.sulake.com) about functional programming languages and how to adopt a functional-style in Java development. I argue that functional programs are more robust than imperative ones.
The presentation provides an introduction to the emulation world, in particular to the mythical Commodore 64 and its peripherals, like disk drive, printer, cartridges. To truly emulate the software written for this 8-bit home computer it is mandatory to be much accurate as possible and reproduce every single aspect of the real machine, starting from the chips that compose the hardware architecture. Beside the emulation topics the presentation faces some Scala performance issues that come up when you have to optimize low level operations. At the end I'll show you a demo where we'll see the emulator running a game and a demo-scene, one of the hardest software to emulate.
Scala.js is a compiler that compiles Scala source code to equivalent Javascript code. It can be seen as the start of a revolution in developing web application. In this talk, I'll present Scala.js project, common libraries for having a pleasure web development (such as scalatags, autowire and upickle) and integration with well known javascript libraries such as AngularJS and React.js.
The need to handle increasingly large volumes of data, to quickly drive decisions (via streaming technologies and machine learning algorithms), to scale systems effectively, to guarantee the right level of continuity, to float data across systems efficiently and others are becoming critical and challenging requirements. During this talk we’ll demonstrate how to design reactive, resilient, message driven and elastic applications by combining technologies such as Akka, Kakfa, Cassandra and Spark along with architectural patterns like CQRS, ES, etc. in order to achieve the previously mentioned needs.
During this session we will explore the component and the best practices behind a scalable Scala-based microservice architecture. We will see how to build a REST service with Akka and Spray, how to document its API with Swagger, how to package it with Sbt and Docker, how to deploy it with Mesos and Marathon and how to let him interact with other services with Bamboo. The talk with be full of code and practical tips.
Concurrency has always been a challenging area due to its complexity and unpredictability. Thanks to its Actor-Based Model, Akka provides a tool to tackle concurrency issues and easily create performant and scalable applications. In this talk we will describe what Akka is, what are the advantages of using it and how to use it -- or probably we should say how not to use it! We will also discuss Actors and their life cycle. Finally, we will provide examples of their four core operations: create, send, become and supervise actors.
Akka Streams is an implementation of Reactive Streams, which is a standard for asynchronous stream processing with non-blocking backpressure on the JVM. In this talk we'll cover the rationale behind Reactive Streams, and explore the different building blocks available in Akka Streams. I'll use Scala for all coding examples, but Akka Streams also provides a full-fledged Java8 API. After this session you will be all set and ready to reap the benefits of using Akka Streams!
Phil Calçado - Your microservice as a functionScala Italy
SoundCloud's microservice architecture is built mostly in Scala, using Finagle as its distributed systems workhorse. Finagle is an RPC system for the JVM, and it is based on a pipes-and-filters architecture that maps very nicely to functional programming concepts of higher-order functions and combinators. Over the past few years we have found that it is extremely useful to go even a step further and think of microservices as functions themselves. In this talk let's explore how SoundCloud uses Scala and Finagle, and how we started thinking of a microservices architecture as a special case of a functional system.
Scala meetup - Milan, 25 May 2013
Dopo anni di sviluppo Web in Java con le Servlet come base, vediamo come poter sviluppare usando le stesse solide fondamenta con Scala. Scalatra è un toolkit minimale che ci permette di iniziare ad approcciare Scala sul web attraverso le Servlet permettendoci di integrare Scala (o di migrare) in delle WebApp già esistenti. Vedremo in questo quickie come delle funzionalità generiche ed avanzate, implementate con SpringMVC, possono essere implementate con Scalatra.
Scala: the language of languages - Mario Fusco (Red Hat)Scala Italy
Scala meetup - Milan, 25 May 2013
Molte caratteristiche di Scala sono state appositamente pensate (o almeno lo sembrano) per favorire la sviluppo di Domain Specific Languages. Ad esempio le conversioni implicite e le funzioni con più set di parametri è possibile progettare DSL interni molto leggibili, mentre i parser combinator consentono di sviluppare DSL esterni con un minimo sforzo. Lo scopo del talk è quello di mostrare il funzionamento di queste tecniche e strumenti con esempi pratici.
Reflection in Scala Whats, Whys and Hows - Walter Cazzola (Dipartimento di In...Scala Italy
Scala meetup - Milan, 25 May 2013
Computational reflection is a mechanism that permits to do computations on
the computation itself. Scala before version 2.10 was relying on the Java
implementation for all the reflective computations but this has some
limitations especially on the support of types proper of Scala. In Scala
2.10 reflection becomes a native concept and covers the whole spectrum of
Scala concepts; it also introduces some specific reflective mechanisms as
macros. In this talk, we will explore what reflection is, why it is a
desirable mechanism for modern programming languages and to what extent and
how Scala 2.10 supports it.
Scala meetup - Milan, 25 May 2013
Una delle caratteristiche peculiari di Scala consiste nel semplificare e velocizzare la fase di sviluppo del software. Unificando la programmazione orientata agli oggetti con la programmazione funzionale, Scala permette di esprimervi in maniera concisa ed efficace. In questa presentazione saranno introdotte le caratteristiche principali del linguaggio e la sua filosofia, al fine di mostrare come del codice scritto in Scala risulti più semplice, corretto e manutenibile.
State of ICS and IoT Cyber Threat Landscape Report 2024 previewPrayukth K V
The IoT and OT threat landscape report has been prepared by the Threat Research Team at Sectrio using data from Sectrio, cyber threat intelligence farming facilities spread across over 85 cities around the world. In addition, Sectrio also runs AI-based advanced threat and payload engagement facilities that serve as sinks to attract and engage sophisticated threat actors, and newer malware including new variants and latent threats that are at an earlier stage of development.
The latest edition of the OT/ICS and IoT security Threat Landscape Report 2024 also covers:
State of global ICS asset and network exposure
Sectoral targets and attacks as well as the cost of ransom
Global APT activity, AI usage, actor and tactic profiles, and implications
Rise in volumes of AI-powered cyberattacks
Major cyber events in 2024
Malware and malicious payload trends
Cyberattack types and targets
Vulnerability exploit attempts on CVEs
Attacks on counties – USA
Expansion of bot farms – how, where, and why
In-depth analysis of the cyber threat landscape across North America, South America, Europe, APAC, and the Middle East
Why are attacks on smart factories rising?
Cyber risk predictions
Axis of attacks – Europe
Systemic attacks in the Middle East
Download the full report from here:
https://sectrio.com/resources/ot-threat-landscape-reports/sectrio-releases-ot-ics-and-iot-security-threat-landscape-report-2024/
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Tobias Schneck
As AI technology is pushing into IT I was wondering myself, as an “infrastructure container kubernetes guy”, how get this fancy AI technology get managed from an infrastructure operational view? Is it possible to apply our lovely cloud native principals as well? What benefit’s both technologies could bring to each other?
Let me take this questions and provide you a short journey through existing deployment models and use cases for AI software. On practical examples, we discuss what cloud/on-premise strategy we may need for applying it to our own infrastructure to get it to work from an enterprise perspective. I want to give an overview about infrastructure requirements and technologies, what could be beneficial or limiting your AI use cases in an enterprise environment. An interactive Demo will give you some insides, what approaches I got already working for real.
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Ramesh Iyer
In today's fast-changing business world, Companies that adapt and embrace new ideas often need help to keep up with the competition. However, fostering a culture of innovation takes much work. It takes vision, leadership and willingness to take risks in the right proportion. Sachin Dev Duggal, co-founder of Builder.ai, has perfected the art of this balance, creating a company culture where creativity and growth are nurtured at each stage.
Search and Society: Reimagining Information Access for Radical FuturesBhaskar Mitra
The field of Information retrieval (IR) is currently undergoing a transformative shift, at least partly due to the emerging applications of generative AI to information access. In this talk, we will deliberate on the sociotechnical implications of generative AI for information access. We will argue that there is both a critical necessity and an exciting opportunity for the IR community to re-center our research agendas on societal needs while dismantling the artificial separation between the work on fairness, accountability, transparency, and ethics in IR and the rest of IR research. Instead of adopting a reactionary strategy of trying to mitigate potential social harms from emerging technologies, the community should aim to proactively set the research agenda for the kinds of systems we should build inspired by diverse explicitly stated sociotechnical imaginaries. The sociotechnical imaginaries that underpin the design and development of information access technologies needs to be explicitly articulated, and we need to develop theories of change in context of these diverse perspectives. Our guiding future imaginaries must be informed by other academic fields, such as democratic theory and critical theory, and should be co-developed with social science scholars, legal scholars, civil rights and social justice activists, and artists, among others.
UiPath Test Automation using UiPath Test Suite series, part 4DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 4. In this session, we will cover Test Manager overview along with SAP heatmap.
The UiPath Test Manager overview with SAP heatmap webinar offers a concise yet comprehensive exploration of the role of a Test Manager within SAP environments, coupled with the utilization of heatmaps for effective testing strategies.
Participants will gain insights into the responsibilities, challenges, and best practices associated with test management in SAP projects. Additionally, the webinar delves into the significance of heatmaps as a visual aid for identifying testing priorities, areas of risk, and resource allocation within SAP landscapes. Through this session, attendees can expect to enhance their understanding of test management principles while learning practical approaches to optimize testing processes in SAP environments using heatmap visualization techniques
What will you get from this session?
1. Insights into SAP testing best practices
2. Heatmap utilization for testing
3. Optimization of testing processes
4. Demo
Topics covered:
Execution from the test manager
Orchestrator execution result
Defect reporting
SAP heatmap example with demo
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
"Impact of front-end architecture on development cost", Viktor TurskyiFwdays
I have heard many times that architecture is not important for the front-end. Also, many times I have seen how developers implement features on the front-end just following the standard rules for a framework and think that this is enough to successfully launch the project, and then the project fails. How to prevent this and what approach to choose? I have launched dozens of complex projects and during the talk we will analyze which approaches have worked for me and which have not.
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
UiPath Test Automation using UiPath Test Suite series, part 3DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 3. In this session, we will cover desktop automation along with UI automation.
Topics covered:
UI automation Introduction,
UI automation Sample
Desktop automation flow
Pradeep Chinnala, Senior Consultant Automation Developer @WonderBotz and UiPath MVP
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
JMeter webinar - integration with InfluxDB and GrafanaRTTS
Watch this recorded webinar about real-time monitoring of application performance. See how to integrate Apache JMeter, the open-source leader in performance testing, with InfluxDB, the open-source time-series database, and Grafana, the open-source analytics and visualization application.
In this webinar, we will review the benefits of leveraging InfluxDB and Grafana when executing load tests and demonstrate how these tools are used to visualize performance metrics.
Length: 30 minutes
Session Overview
-------------------------------------------
During this webinar, we will cover the following topics while demonstrating the integrations of JMeter, InfluxDB and Grafana:
- What out-of-the-box solutions are available for real-time monitoring JMeter tests?
- What are the benefits of integrating InfluxDB and Grafana into the load testing stack?
- Which features are provided by Grafana?
- Demonstration of InfluxDB and Grafana using a practice web application
To view the webinar recording, go to:
https://www.rttsweb.com/jmeter-integration-webinar
2. “Scala” is going nowhere
“Scala is a gateway drug to Haskell”
Recognizing this fact,
we should phase out the name “Scala”
Idea and Design: Sandro Stucky
4. Where It Came From
1980s Modula-2, Oberon
1990-95 Functional Programming: λ calculus, Haskell, SML
1995-98 Pizza
1998-99 GJ, javac
2000-02 Functional Nets, Funnel
4
5. Motivation for Scala
• Grew out of Funnel
• Wanted to show that we can do a practical combination of OOP and
FP.
• What got dropped:
• Concurrency was relegated to libraries
• No tight connection between language and core calculus
(fragments were studied in the νObj paper and others.)
• What got added:
• Native object and class model, Java interop, XML literals.
5
6. Why <XML>?
I wanted Scala to have a hipster syntax.
• Everybody uses [..] for arrays, so we use (..)
• Everybody uses <..> for types, so we use [..]
• But now we needed to find another use of <..>
7. What Makes Scala Scala?
Scala is
• functional
• object-oriented / modular
• statically typed
• strict
• Closest predecessor: OCaml.
• Differences: OCaml separates object and module
system, Scala unifies them
• OCaml uses Hindley/Milner, Scala subtyping + local
type inference.
8. 1st Invariant: A Scalable Language
• Instead of providing lots of features in the language, have the right
abstractions so that they can
be provided in libraries.
• This has worked quite well so far.
• It implicitly trusts programmers and library designers to “do the right
thing”, or at least the community to sort things out.
8
9. • Scala’s core is its type system.
• Most of the advanced types concepts are about flexibility, less so
about safety.
2nd Invariant: It’s about the Types
9
Flexibility / Ease of Use
Safety
Scala
Trend in Type-systems
Goals of PL design
where we’d like it to move
12. New Environment: Scala.JS
Feb 5, 2015:
Scala.JS 0.6 released
No longer experimental!
Fast
Great interop with Javascript libraries
13. Why does Scala.JS work so well?
• Because of @srjd, and the great people who contribute.
• But also: It plays to the strengths of Scala
• Libraries instead of primitives
• Flexible type system
• Geared for interoperating with a host language.
14. Tool Improvements
• Much faster incremental compiler, available in sbt and IDEs
• New IDEs
• Eclipse IDE 4.0
• IntelliJ 14.0
• Ensime: make the Scala compiler available to help editing
20. Emergence of a platform
• Core libraries
• Specifications:
• Futures
• Reactive Streams
• Spores
• Common vocabulary
à Beginnings of a reactive platform, analogous to Java EE
22. What Are Classfiles Good For?
• Portability across hardware
• Portability across OS/s
• Interoperability across versions
• Place for
- optimizations,
- analysis,
- instrumentation
So what is the analogue of the JDK for Scala?
23. Picture so far:
Scala Source
Classfiles + Scala Signatures
Native code
Scala piggybacks on the JDK
scalac
JDK JIT
24. Challenges for Scala
• Binary compatibility
• scalac has way more transformations to do than javac.
• Compilation schemes change
• Many implementation techniques are non-local, require co-
compilation of library and client. (e.g. trait composition).
• Having to pick a platform
• Previously: platform is “The JDK.”
• In the future: Which JDK? 7, 8, 9, 10? And what about JS?
26. • TASTY: Serialized Typed Abstract Syntax Trees
• E.g., here’s a TAST for x
+
2
The Core
Apply
Select
Ident
“+”
“x”
::
Literal
Nil
2
Int
(Int)Int
Int(2)
Int
27. Serialized TASTY File Format
27
A reference format for
analysis + transformation
of Scala code
high-level
complete
detailed.
28. def
plus2(x:
Int)
=
x
+
2 becomes
Overall: TASTY trees take up ~25% of classfile size
Example:
28
x
+
2
29. What We Can Do With It
Applications:
• instrumentation
• optimization
• code analysis
• refactoring
Publish once, run everywhere.
Automated remapping to solve binary compatibility issues.
31. Connect the Dots
DOT: A calculus for
Papers in FOOL ‘12, OOPSLA ’14.
Work on developing a fully expressive machine-verified version
is still onoping.
dotc: A compiler for a cleaned up version of Scala.
lampepfl/dotty on Github
31
38. New Concepts
Type unions (T&U) and intersections (T|U)
• replace compound types (T with U)
• Eliminate potential of blow-up in least upper bound / greatest lower
bound operations
• Make the type system cleaner and more regular (e.g. intersection, union
are commutative).
• But pose new challenges for compilation. E.g.
class
A
{
def
x
=
1
}
class
B
{
def
x
=
2
}
val
ab:
A
|
B
=
???
ab.x
// which x gets called?
39. Status
Compiler close to completion
Should have an alpha release by ScalaDays Amsterdam
Plan to use TASTY for
merging dotc and scalac.
41. 1. Implicits that compose
We already have implicit lambdas
implicit
x
=>
t
implicit
transaction
=>
body
What about if we also allow implicit function types?
implicit
Transaction
=>
Result
Then we can abstract over implicits:
type
Transactional[R]
=
implicit
Transaction
=>
R
Types like these compose, e.g.
type
TransactionalIO[R]
=
Transactional[IO[R]]
42. expands to
New Rule:
If the expected type of an expression E is an implicit
function, E is automatically expanded to an implicit closure.
def
f:
Transactional[R]
=
body
def
f:
Transactional[R]
=
implicit
_:
Transaction[R]
=>
body
43. 2. Better Treatment of effects
So far, purity in Scala is by convention, not by coercion.
In that sense, Scala is not a pure functional language.
We’d like to explore “scalarly” ways to express effects of functions.
Effects can be quite varied, e.g.
- Mutation
- IO
- Exceptions
- Null-dereferencing, ...
Two essential properties:
- they are additive,
- they propagate along the call-graph.
44. `
“Though Shalt Use Monads for Effects”
Monads are cool
But for Scala I hope we find something even better.
• Monads don’t commute.
• Require monad transformers for composition.
• I tried to wrap my head around it, but then it exploded.
45. use this
Idea: Use implicits to model effects as
capabilities
def
f:
R
throws
Exc
=
...
def
f(implicit
t:
CanThrow[Exc]):
R
=
...
instead of this
type
throws[R,
Exc]
=
implicit
CanThrow[Exc]
=>
R
or add this
to get back to this!
46. In Summary
Scala
- established functional programming in the mainstream,
- showed that a fusion with object-oriented programming is possible
and useful,
- promoted the adoption of strong static typing,
- has lots of enthusiastic users, conference attendees included.
Despite it being 10 years out it has few close competitors.
46
47. Our Aims
• Make the platform more powerful
• Make the language simpler
• Work on foundations to get to the essence of Scala.
Let’s continue to work together to achieve this.
Thank You!