Scala is a programming language that runs on the JVM and fuses functional and object-oriented paradigms. It aims to provide functional programming for programmers with an imperative mindset. Key features include functions as first-class values, pattern matching, traits for composition, and seamless interoperability with Java. While some features appear to be language features, many are actually implemented via libraries. The Scala community is growing with adoption by companies and increasing support in tools and publications.
GraalVM is an ecosystem and runtime that provides performance advantages to JVM languages like Java, Scala, Groovy, and Kotlin as well as other languages. It includes a just-in-time compiler called Graal that improves efficiency, polyglot APIs for combining languages, and SDK for embedding languages and creating native images. Installation can be done with the JDK which includes Graal starting with JDK 9, or by directly downloading GraalVM from Oracle's website.
This document provides an overview of the Scala programming language. Scala was designed to be scalable by unifying object-oriented and functional programming. It runs on the Java Virtual Machine and interoperates with Java libraries. Scala code is more concise than Java due to features like type inference, immutable data structures, and support for functional programming patterns. Popular frameworks developed using Scala include Apache Spark, Kafka, and Akka. Scala sees widespread use in domains like big data, web development, and scientific computing.
Apache Kafka vs. Integration Middleware (MQ, ETL, ESB) - Friends, Enemies or ...confluent
Apache Kafka can act as both an enemy and a friend to traditional middleware like message queues, ETL tools, and enterprise service buses. As an enemy, Kafka replaces many of the individual components and provides a single scalable platform for messaging, storage, and processing. However, Kafka can also integrate with traditional middleware as a friend through connectors and client APIs, allowing certain use cases to still leverage existing tools. In complex environments with both new and legacy systems, Kafka acts as a "frenemy" - replacing some functions but integrating with other existing technologies to provide a bridge to new architectures.
This document contains a quiz on Java programming concepts like NullPointerException, floating point numbers, StringBuffer, inheritance, and stacks. It includes 10 multiple choice questions related to code snippets that demonstrate these concepts, along with explanations of some answers.
Commands, events, queries - three types of messages that travel through your application. Some originate from the web, some from the command-line. Your application sends some of them to a database, or a message queue. What is the ideal infrastructure for an application to support this on-going stream of messages? What kind of architectural design fits best?
This talk provides answers to these questions: we take the *hexagonal* approach to software architecture. We look at messages, how they cross boundaries and how you can make steady communication lines between your application and other systems, like web browsers, terminals, databases and message queues. You will learn how to separate the technical aspects of these connections from the core behavior of your application by implementing design patterns like the *command bus*, and design principles like *dependency inversion*.
Java 9/10/11 - What's new and why you should upgradeSimone Bordet
Java 11 is the new Java release and, differently from Java 9 and Java 10, it is a "Long Term Support" release - we will see what that means exactly.
This presentation details the main new features of Java 11, starting from licensing (where there are important changes - in particular the Oracle JDK may only be used in production if you have a support contract with Oracle), to arrive to the new Java 11 features, with a quick peek back at what was introduced in Java 9 and Java 10.
The main Java 11 arguments are:
• Two new garbage collectors: EpsilonGC e ZGC
• Support for TLS 1.3
• Possibility to execute a single source file
• New HTTP client based on the Flow API
• Removal of modules (CORBA, JTA, @Inject, ecc.)
• Bytecode news (nest-mates, dynamic constants)
The document discusses various Java concurrency concepts including threads, locks, semaphores, and concurrent collections. It provides examples to illustrate thread synchronization issues like race conditions and deadlocks. It also demonstrates how to use various concurrency utilities from java.util.concurrent package like CountDownLatch, Exchanger, PriorityBlockingQueue to synchronize thread execution and communication between threads. The examples aim to help developers write correct concurrent programs by avoiding common pitfalls in multithreaded programming.
Presentation provides introduction and detailed explanation of the Java 8 Lambda and Streams. Lambda covers with Method references, default methods and Streams covers with stream operations,types of streams, collectors. Also streams are elaborated with parallel streams and benchmarking comparison of sequential and parallel streams.
Additional slides are covered with Optional, Splitators, certain projects based on lambda and streams
This presentation provides an overview of core Java concepts. It introduces Java as a popular programming language due to its portability across platforms. It then outlines the contents to be covered, including what Java is, where it is used, its features, how Java programs are translated and executed, and an overview of the Java system. Key topics like the Java Virtual Machine, object-oriented programming concepts in Java, data types, and garbage collection are explained. The advantages and disadvantages of Java are also presented. Finally, a library management system project built in Java is described as an example.
Scylla Summit 2022: New AWS Instances Perfect for ScyllaDBScyllaDB
In this talk AWS’ Ken Krupa, Head of Specialized Solutions Architecture, will describe the architecture and capabilities of two new AWS EC2 instance types perfect for data-intensive storage and IO-heavy workloads like ScyllaDB: the Intel-based I4i and the Graviton2-based I4g series.
The Intel Xeon Ice Lake-based I4i series provides unparalleled raw horsepower for your most demanding workloads. Meanwhile, the Graviton2-powered I4g instances provide lower cost per storage on a power-efficient platform to deploy your cloud-native applications.
Ken will also describe the AWS Nitro SSD, a new form of high-speed NVMe storage with a Flash Translation Layer built with Nitro controllers, which powers both of these instance families.
ScyllaDB VP of Product Tzach Livyatan will then share benchmarking results showing how ScyllaDB behaves under load on these two instance types, providing maximum system utility and efficiency.
To watch all of the recordings hosted during Scylla Summit 2022 visit our website here: https://www.scylladb.com/summit.
Here are slides from basic training for Gradle.
This training is aimed to help Java Developers to get hands-on experience to use Gradle as a primary build tool for Java source code starting from simple compilation continuing with different kinds of tests and finishing with code quality analysis and artefacts publishing.
The document discusses distributed computing and caching with Hazelcast. It describes Hazelcast as an open-source Java middleware that allows creating a distributed in-memory data grid (IMDG). Hazelcast partitions and replicates data across nodes to provide scalable distributed data storage and processing. It implements common data structures like maps, queues, sets, and lists in a distributed manner to improve performance and scalability for distributed systems.
This document provides an introduction to object-oriented programming and Java. It discusses the basics of OOP concepts like classes, objects, encapsulation, inheritance, polymorphism and dynamic binding. It explains the benefits of OOP like modularity, code reuse and information hiding. The document also outlines some key features of the Java programming language like platform independence, security, simplicity and performance. It positions Java as a pure object-oriented language suitable for developing both standalone applications and web applets.
This document introduces TypeScript, a typed superset of JavaScript that compiles to plain JavaScript. It discusses TypeScript's installation, why it is used, main features like type annotations and classes, comparisons to alternatives like CoffeeScript and Dart, companies that use TypeScript, and concludes that TypeScript allows for safer, more modular code while following the ECMAScript specification. Key benefits are highlighted as high value with low cost over JavaScript, while potential cons are the need to still understand some JavaScript quirks and current compiler speed.
The document discusses Scala, a programming language designed to be scalable. It can be used for both small and large programs. Scala combines object-oriented and functional programming. It interoperates seamlessly with Java but allows developers to add new constructs like actors through libraries. The Scala community is growing, with industrial adoption starting at companies like Twitter.
React Class Components vs Functional Components: Which is Better?Fibonalabs
Earlier, class components were the only option to add states to components and manipulate the lifecycle. However, since the introduction of React Hooks, now we can add the same functionality to function components.
Introduction to Functional Programming with Scalapramode_ce
The document provides an introduction to functional programming with Scala. It outlines the following topics that will be covered: learning Scala syntax and writing simple programs; important functional programming concepts like closures, higher-order functions, purity, lazy evaluation, currying, tail calls, immutability, and type inference; and understanding the functional programming paradigm through Scala. It also provides some background information on Scala and examples of Scala code demonstrating various concepts.
The objectives of the seminar are to shed a light on the premises of FP and give you a basic understanding of the pillars of FP so that you would feel enlightened at the end of the session. When you walk away from the seminar you should feel an inner light about the new way of programming and an urge & motivation to code like you never before did!
Functional programming should not be confused with imperative (or procedural) programming. Neither it is like object oriented programming. It is something different. Not radically so, since the concepts that we will be exploring are familiar programming concepts, just expressed in a different way. The philosophy behind how these concepts are applied to solving problems are also a little different. We shall learn and talk about essentially the fundamental elements of Functional Programming.
1. Monads are container types like Option and List that allow computation on the contained values.
2. Monads support higher-order functions like map and flatMap that can transform the contained values.
3. Monads can be combined through operations like flatMap and flatten that allow chaining computations together in a uniform way.
4. Different monads can be implemented in different ways but generally involve unit/return, map/fmap, and flatMap/bind operations.
This document discusses monads in Scala. It begins by introducing monads as structures that represent computations defined as sequences of steps and that can add effects to values. It then provides examples of monads in the Scala standard library like Option, List, Try, and Future that add effects like nullability, iterability, exceptions, and asynchronous behavior. The document explains how to use monads with unit and flatMap and discusses monad laws and patterns for extracting values from monads. It emphasizes that monads help keep code clean, readable, maintainable, and less buggy.
The document describes a small functional programming language called Little Quilt that manipulates geometric objects. Little Quilt includes basic values like squares and operations like turning and sewing squares together. It then discusses types in functional programming including basic types, product types, list types, and operations on types. The document also covers function declarations and applications, recursive functions, approaches to expression evaluation, type checking, and overloading.
This document compares procedural programming and object-oriented programming approaches to a shape rotation and sound playback problem. It shows how the OO approach using classes and inheritance can better handle changes to requirements by separating common behavior into a base class and allowing derived classes to override specific behaviors as needed. This reduces duplicated code and makes the solution more flexible and maintainable.
The document provides an overview of Scala training covering key language features including functions, implicits, monads, and actors. It discusses high order functions, implicit conversions, the Try and Option monads for error handling, and how actors provide thread-safe concurrency through message passing and defined behaviors. Code examples are given for implementing REST APIs using implicits, composing monadic operations, and defining actor classes and messages. References for further learning about Scala and functional programming concepts are also listed.
The document discusses functional programming concepts like monads, functors, and for comprehensions in Scala. It provides definitions and laws for functors, monads, and monadic operations like map, flatMap, filter. It shows the equivalence between for comprehensions and flatMap/map implementations. It also discusses monadic zeros and filtering laws. Key concepts covered include the functor laws, monad laws, equivalence between map/flatMap and for comprehensions, and laws for operations like filter.
This document outlines a talk on using category theory concepts in functional programming. It begins by introducing the definition of a category from category theory and using Scala examples to demonstrate how types and functions in Scala satisfy this definition. It then defines functors, natural transformations, and monads from category theory and provides examples showing how options, lists, and functions in Scala form a monad. It proves that the category theory definition of a monad is equivalent to the definition used in functional programming. The document suggests category theory concepts help formalize design patterns and make code more refactorable.
This document summarizes Spark, a fast and general engine for large-scale data processing. Spark addresses limitations of MapReduce by supporting efficient sharing of data across parallel operations in memory. Resilient distributed datasets (RDDs) allow data to persist across jobs for faster iterative algorithms and interactive queries. Spark provides APIs in Scala and Java for programming RDDs and a scheduler to optimize jobs. It integrates with existing Hadoop clusters and scales to petabytes of data.
Scala is a general purpose programming language that blends object-oriented and functional programming. It is designed to interoperate with Java code, as Scala compiles to Java bytecode. Scala incorporates features from functional programming like immutable variables and higher-order functions, as well as object-oriented features like classes and inheritance. Key differences from other languages include its support for features like pattern matching, traits, and type inference.
Jump Start into Apache Spark (Seattle Spark Meetup)Denny Lee
Denny Lee, Technology Evangelist with Databricks, will demonstrate how easily many Data Sciences and Big Data (and many not-so-Big Data) scenarios easily using Apache Spark. This introductory level jump start will focus on user scenarios; it will be demo heavy and slide light!
Hive was initially developed by Facebook to manage large amounts of data stored in HDFS. It uses a SQL-like query language called HiveQL to analyze structured and semi-structured data. Hive compiles HiveQL queries into MapReduce jobs that are executed on a Hadoop cluster. It provides mechanisms for partitioning, bucketing, and sorting data to optimize query performance.
Another episode in series of Functional Thinking in Scala. This episode relates to Referential Transparency, Substitution model, context dependence and error handling in Scala.
Presentation on handling non-existence of data in Java et. al. (e.g. the problem with pesky nulls) and an introduction to the Option monad in Scala as a "solution" to this problem.
I presented this talk June, 28th 2013 at CPH Scala Group meeting, and a week later, July 3rd, at the "Scala User Group Århus" meetup.
In this short introduction, I try to frame the problem, i.e. the large amounts of error-prone null-checking code we usually have to write in Java, and Introduce the Option monad (Some/None) in Scala, as a solution. I explain the basics of what the Option class provides, and various ways of using it, ranging from basic level isEmtpy, over pattern-matching to more advanced fully functional "collection-style" (e.g. map, flatMap) operations and finally by using the for-comprehension.
Also includes links to relevant resources for further reading on the last slide.
Performance Optimization Case Study: Shattering Hadoop's Sort Record with Spa...Databricks
Performance Optimization Case Study: Shattering Hadoop's Sort Record with Spark and Scala
Talk given by Reynold Xin at Scala Days SF 2015
In this talk, Reynold talks about the underlying techniques used to achieve high performance sorting using Spark and Scala, among which are sun.misc.Unsafe, exploiting cache locality, high-level resource pipelining.
The document provides an overview of key differences between Python and Scala. Some key points summarized:
1. Python is a dynamically typed, interpreted language while Scala is statically typed and compiles to bytecode. Scala supports both object-oriented and functional programming paradigms.
2. Scala has features like case classes, traits, and pattern matching that Python lacks. Scala also has features like type parameters, implicit conversions, and tail call optimization that Python does not support natively.
3. Common data structures like lists and maps are implemented differently between the languages - Scala uses immutable Lists while Python uses mutable lists. Scala also has features like lazy vals.
4. Control
The document provides an overview and agenda for a JavaScript bootcamp presented by Alexei White of Nitobi. The bootcamp will cover JavaScript basics like lexical structure, data types, objects, and arrays. It will also cover more advanced topics like debugging, DOM manipulation, events, and Ajax. The document includes the schedule, which is divided into three parts that progress from basics to advanced concepts. It also lists recommendations for integrated development environments (IDEs) on both Windows and Mac platforms.
The document provides an overview and agenda for a JavaScript bootcamp presented by Alexei White of Nitobi. The bootcamp will cover JavaScript basics like lexical structure, data types, objects, and arrays. It will also cover more advanced topics like debugging, DOM manipulation, events, and Ajax. The document includes the schedule, goals of the bootcamp, and information about the presenter and Nitobi.
LISP: How I Learned To Stop Worrying And Love ParanthesesDominic Graefen
The document discusses functional programming and compares it to object-oriented programming. It provides a brief history of functional programming languages like Lisp from the 1950s and newer languages that have become popular more recently like Clojure, F# and Scala. It explains some key aspects of functional programming like higher-order functions, recursion, pure functions and using functions as values. It also discusses why functional programming has become more popular again recently, in part due to multi-core processors and a need for concurrency.
This document provides an introduction to functional programming. It begins by explaining that while programs with functions could be considered functional, functional programming specifically avoids mutable state and treats computation as mathematical function evaluation. It then contrasts imperative vs declarative programming and gives examples in different languages. Finally, it demonstrates how JavaScript supports some functional programming concepts like first-class functions and provides a short example of mapping a function over an array to summarize the key ideas of functional programming.
This document provides an introduction to functional programming. It begins by explaining that while programs with functions could be considered functional, functional programming specifically avoids mutable state and treats computation as mathematical function evaluation. It then contrasts imperative vs declarative programming and gives examples in different languages. Finally, it demonstrates how JavaScript supports some functional programming concepts like first-class functions and provides a short example of mapping a function over an array to summarize the key ideas of functional programming.
Functional programming in Java 8 allows for:
1) The use of lambda expressions and streams for a more declarative programming style without iteration.
2) Functional interfaces like Function, Predicate, and Consumer along with lambda expressions enable function composition and chaining.
3) Features like immutable collections help reduce mutability and side effects, important aspects of functional programming.
Introduction to functional programming (In Arabic)Omar Abdelhafith
Functional programming is a declarative programming paradigm where programs are built around mathematical functions and immutable data transformation (1). Key aspects include using pure functions that always return the same output for the same input and avoid side effects, immutable data that does not change state, representing everything as expressions rather than statements, and treating functions as data that can be passed into other functions or returned from them (2). These characteristics allow functional programs to be deterministic, avoid bugs from mutable state, and more easily write parallel and distributed programs (3).
The document provides an introduction and overview of Scala concepts. In 3 sentences:
Scala is an object-oriented and functional language that runs on the Java Virtual Machine. It combines object-oriented and functional programming which allows for modularity, extensibility, and composition. The document discusses Scala concepts like expressions, types, values, classes, traits, objects, pattern matching and more to build a fundamental understanding of how Scala programs work.
Programming Android Application in Scala.Brian Hsu
The document discusses using Scala to develop Android applications. Scala allows satisfying three desires at once: REPL, scripting, and compiling. It supports traits for mixin composition, functional programming, static typing with duck typing. SBT is introduced as a build tool for Scala/Android projects that does not require configuration and supports continuous compilation with an Android plugin. Live demos show installing SBT/SBT-Android and creating a sample Scala/Android project. Some limitations of Scala with Android like accessing static protected Java fields are also mentioned.
Martin Odersky discusses the past, present, and future of Scala over the past 5 years and next 5 years. Key points include:
- Scala has grown significantly in usage and community over the past 6 years since its first release.
- Scala 2.8 will include improvements like new collections, package objects, named/default parameters, and better tool support.
- Over the next 5 years, Scala will focus on improving concurrency and parallelism through better abstractions, analyses, and static typing support.
Martin Odersky outlines the growth and adoption of Scala over the past 6 years and discusses Scala's future direction over the next 5 years. Key points include:
- Scala has grown from its first classroom use in 2003 to filling a full day of talks at JavaOne in 2009 and developing a large user community.
- Scala 2.8 will include new collections, package objects, named/default parameters, and improved tool support.
- Over the next 5 years, Scala will focus on concurrency and parallelism features at all levels from primitives to tools.
- Other areas of focus include extended libraries, performance improvements, and standardized compiler plugin architecture.
Scala 2.8 will include improvements to collections, package objects, named and default parameters, and faster generics through specialization. Over the next 5 years, focus will be on concurrency and parallelism at all levels. Better tools like an improved REPL and IDE integration are also planned. The essence of Scala is concentrating on powerful abstractions to reduce boilerplate and allow powerful libraries.
This document summarizes Martin Odersky's talk about the past, present, and future of the Scala programming language over the next 5 years. It discusses Scala's growth in popularity and adoption from 2003-2009. It also outlines new features in the 2.8 version including improved collections, package objects, named parameters, and improved tooling. Finally, it discusses focus areas for the next 5 years including improved concurrency, parallelism, static typing, and language abstractions to support reliable concurrent programming.
This document provides an introduction to Java programming through a 3-part Java 101 tutorial. It covers setting up a development environment, an overview of the Java language, and how to write a simple "Hello World" program. It also introduces key Java concepts like data types, conditionals, loops, and classes. The document includes code examples and exercises for hands-on learning.
The document discusses Scala and why some developers think it could replace Java on the JVM. It provides quotes from several influential developers, including the creator of Java and Groovy, expressing their view that Scala is the best candidate to replace Java in the long run. Specifically, James Gosling says that if he had to pick another language on the JVM besides Java, it would be Scala. Charlie Nutter describes Scala as the current heir apparent to the Java throne and the momentum behind Scala is now unquestionable. James Strachan says that if he had seen the Programming in Scala book in 2003, he may have never created Groovy and that his tip for a long term replacement for Java is
An Introduction to Scala - Blending OO and Functional ParadigmsMiles Sabin
Scala is a programming language that blends object-oriented and functional programming. It is designed to be compatible with Java and runs on the JVM. Scala has features like functions as first-class values, pattern matching, and immutable data structures. It aims to improve on Java syntax and provides tools like case classes and for comprehensions. Scala sees growing adoption in companies like Twitter and LinkedIn and future releases will continue to explore new type systems and features.
This document provides an overview of the Erlang programming language. It discusses that Erlang is a general purpose, concurrent, functional programming language developed at Ericsson for building distributed, fault-tolerant systems. It notes some of Erlang's key uses in telecommunications, banking, messaging, and e-commerce where high-availability is required. The document also summarizes that Erlang uses processes instead of threads to enable concurrency, and that it relies on recursion rather than loops for iteration due to its functional nature.
This document provides an introduction to Java programming through a series of Java 101 tutorials. It discusses setting up a Java development environment, provides an overview of the Java language, and demonstrates how to write a first Java program. It also covers built-in Java data types like String, int, double, and boolean, and control structures like conditionals and loops. The document concludes with exercises for readers to practice working with command line arguments, operators, arrays, and random number generation in Java.
This document provides an agenda and overview of a presentation on JavaScript. It introduces JavaScript, covering its history, cores, uses today, and programming paradigms. It then discusses object-oriented JavaScript, data types and structures, and control statements in JavaScript. The document also mentions functions, prototypes, and JSON before concluding with examples of libraries and frameworks that could be used in a demo program.
Java is an object-oriented programming language created by James Gosling at Sun Microsystems in 1995. It is platform independent, meaning programs written in Java can run on any system that supports Java without needing to be recompiled. The document provides an overview of Java, including its history and development, basic concepts like classes and objects, and how to write simple Java programs. It also discusses Java's advantages like being simple, object-oriented, portable, multithreaded, and secure.
Similar to Scala: functional programming for the imperative mind (20)
It seems like keeping up to date with Java nowadays can be a daunting task. Gone is the era of big, delayed Java releases that span years. We’re now getting a new major release every six months. What’s up with that? You’re probably still developing on Java 8, even though Java 13 is almost released already. Attend this session to get a code-first overview of what’s new in Java since Java 8. You’ll get an overview of the module system (Java 9), the local variable type inference feature (Java 10), and the new HttpClient API (Java 11), plus a sneak peek of Java 12 and 13 preview features. It’s time to embrace the newfound agility of the Java platform!
It seems like keeping up to date with Java nowadays is an enormous task. Gone is the era of big, delayed Java releases that span years. We're now getting a new major release every six months. What's up with that? You're probably still developing on Java 8, even though Java 12 is already available.
Join this session to get a code-first overview of what's new in Java since Java 8. We'll give an overview of the module system (Java 9), the local-variable type inference feature (Java 10), the new HttpClient API (Java 11) and a sneak peek of Switch Expressions in Java 12. Expect lots of advice on what to expect when migrating beyond Java 8. It's time to embrace the newfound agility of the Java platform!
In September 2017 the long-awaited release of Java 9 gave us a new module system in Java. It also kick-started the release-train of frequent Java releases, with Java 11 being the first long-term supported Java version poised to take modules into the mainstream. So what has happened since the introduction of the module system?
This talk will provide an overview adoption of modules in open-source libraries, IDEs, build tools, and so on. It will also feature tools that have emerged to make working with modules easier. Expect an honest overview of the current state of modules in Java, with lots of demos to show what's possible. After this talk you can start developing your own modular Java application without hesitation!
Java 9 brings modules as a core concept to the platform, but it’s more than just a language feature. With modules in Java 9, we can improve the design of code to increase maintainability and extensibility. As with every design principle, modularity requires thought and trade-offs to really reap the benefits. This session covers design practices for making codebases more maintainable and extensible. You will also find out about trade-offs to help you make the best choices. Topics include hiding implementations, using services for extensibility, API modules, avoiding cycles, optional dependencies, and dynamically loading modules. Familiarity with modules is helpful but not required. The speakers are the authors of Java 9 Modularity (O’Reilly).
Also see https://javamodularity.com
Microservices promise a scalable architecture, increased flexibility, and better performance. But then you find out what’s actually involved in designing, developing, and running a microservices-based architecture. It turns out it’s not that straightforward after all.
Often the discussion around microservices is framed by a false dichotomy between the messy monolith and the lean and mean microservices architecture. Sander Mak explains that there’s a third way: the modularized application. Functional decomposition of your application doesn’t imply that every component has to become its own independent process.
Modularization is about strong encapsulation, well-defined interfaces, and explicit dependencies. Many languages offer in-process modularization features (for example, Java 9 with its upcoming module system), and there’s a strong overlap between the microservices philosophy and development benefits—without incurring the penalty of operational complexity.
Sander explores the right (and wrong) reasons for going with a microservices architecture, as well as what a modularized application entails. You’ll see that splitting up an existing service or application into microservices isn’t always the clear winner. You’ll leave able to choose between the alternatives for the right reasons. There’s a place for both independently deployed microservices and larger applications with a strong internal modular structure. Choose wisely.
With Java 9 modules coming to us soon, you want your existing code to be fully ready for the module system. Making code modular can be a daunting task, but Java 9 comes with a number features to ease migration. This includes automatic modules, the unnamed module and a number of command line arguments.
In this talk we will look at examples of migrating real code. It discusses common problems youll run into during migration, leading to practical tips and the ability to set realistic goals. Its also a good way to understand the module system itself and the various migration paths it supports. This talk is an excellent preparation to start migrating your own code.
* Understanding modules and the module path
* Automatic modules
* Mixing classpath and modulepath
* Dealing with reflection
* Escape switches
* Jdeps
All topics will be based on examples of often used libraries and frameworks.
With Java 9, modularity comes to your doorstep (whether you ordered it or not). This isn't your average language feature: making the most out of it may involve rewiring your brain. In this session we explore the benefits of a modular codebase using Java 9 modules. Because who doesn’t like more reliable and secure applications, meanwhile killing the dreaded classpath?
After reviewing the basic concepts of modules, we'll explore modularity patterns that enhance your design and development skills. We all have existing software, so migration of codebases to a modular world is an important topic as well. Automatic modules and other new concepts are added to your toolbox to this end.
Want examples? We've got plenty in this practical and code-driven talk. Even if you intend to use Java 9 without modules, this talk helps you prevent common issues. You'll be ready for Java 9 before you know it.
Both speakers are currently writing “Java 9 Modularity” for O’Reilly, expected early 2017. They have extensive experience under the belt already with the Java 9 Jigsaw early access builds.
With modularity coming to the core Java platform in Java 9, are all our modularity needs fulfilled, or does it still make sense to use something like OSGi? In this talk you will learn how Jigsaw helps modularity, and in what cases it might fall short.
Java 9 will provide a module-system, called Jigsaw. Besides modularising the JDK itself, Java developers can build more modular applications with Jigsaw. Modularity and Java go back way longer, though. OSGi, the de facto standard for modularity in Java has been around since 2000. Adoption is increasing in recent years.
A modular architecture has many advantages, such as increased decoupling resulting in more flexibility. In that sense, native support for Java modularity is very welcome. The big question now is: does Java 9 provide everything you need to build truly modular applications? Since Java 9 needs to maintain backwards compatibility, some compromises need to be made while enforcing module boundaries.
This talk discusses what you really need to build modular applications. We'll investigate which requirements are met (or not) by both module systems. You'll see that both Jigsaw and OSGi provided pieces of the modularity puzzle. Also, you'll learn whether having an additional modular runtime such as OSGi on top of Java 9 still makes sense.
How do we get our software out on the Internet of Things? Many assumptions in current deployment practices don't hold up. Devices can be occasionally connected, through low-bandwidth networks and are generally outside of direct control. Manually shuffling around binaries is not an option.
Apache ACE is an open-source Java provisioning tool tackling such challenges.You can manage Java apps and configs in a modular fashion. The foundations of ACE are OSGi, semantic versioning and reliable communication. Pushing out incremental updates and managing numerous devices becomes possible.
Slides for my talk event-sourced architectures with Akka. Discusses Akka Persistence as mechanism to do event-sourcing. Presented at Javaone 2014 and Jfokus 2015.
This document discusses TypeScript, a superset of JavaScript that adds optional static typing and class-based object-oriented programming. It allows developers to gradually introduce typing into JavaScript code for improved productivity and catch errors early. The document covers TypeScript features like interfaces, classes, modules, type definitions, and comparisons to alternatives like CoffeeScript and Dart. It concludes that TypeScript allows gradual adoption of typing while following the future ECMAScript standard.
Working with micro-services is arguably the best part of OSGi development. However, everyone agrees that tracking service dependencies with the bare-bones OSGi API is not ideal. So, you pick one of the available dependency managers: either Declarative Services, Felix Dependency manager, Blueprint or iPojo.
But how do you pick the right one? Easy! After this shoot-out you’ll know all about the performance, usability and other aspects of the existing dependency managers. We show the strengths and weaknesses of the implementations side-by-side. How usable is the API? What about performance, does it scale beyond trivial amounts of services? Does it matter which OSGi framework you run the dependency manager in?
Make up your mind with the facts presented in this session.
The document discusses JavaScript modularity and module systems. It describes some of the challenges of modularity in JavaScript, like globals and namespacing issues. It then compares different module systems for JavaScript like AMD, CommonJS, and ES6 modules. RequireJS is presented as a robust implementation of the AMD specification that supports features like lazy-loading and backwards compatibility. The document advocates picking one module system and sticking with it for consistency.
This document discusses how modularity was used to build an educational software system called PulseOn in a scalable way for the cloud. Some key points:
- PulseOn was divided into multiple modules (bundles) like personal dashboards, learning content, adaptive recommendations, etc. that communicated through well-defined interfaces.
- Technologies like OSGi, RESTful APIs, MongoDB, and HTML5/JavaScript were used to build these modular and interoperable components.
- The system was designed to automatically scale on demand across multiple servers using load balancers and auto-scaling groups.
- Open-source tools like Amdatu and Apache ACE helped with building and deploying modular cloud-
Cross-Build Injection attacks are a completely new class of attacks that take place at build time. In this presentation (which was presented at JavaOne 2012) I show what the problem is and what can be done about. As always, security doesn't come for free: you'll have to work to get it right!
(unfortunately, some graphics got mangled by the SlideShare conversion. Sorry!)
'Elevate your webapps with Scala & Lift', as presented on JEEConf 2012, Kiev, Ukraine
Also see: http://branchandbound.net/blog/conferences/2012/05/jeeconf-tripreport/
Hibernate Performance Tuning, presented on JEEConf 2012, Kiev, Ukraine.
Also see: http://branchandbound.net/blog/conferences/2012/05/jeeconf-tripreport/
Adaptation of presentation at http://www.slideshare.net/SanderMak/hibernate-performance-tuning
Introduction to Akka, as presented on May 3 2012 at the Belgian Java User Group (BeJUG). For more details see: http://www.bejug.org/confluenceBeJUG/display/BeJUG/ForkJoin+and+Akka
Demo code can be found at: http://bit.ly/bejug-akka
Introduction to JDK7's Fork/Join framework. Present on May 3 2012 at the Belgian Java User Group (BeJUG). For more information see: http://www.bejug.org/confluenceBeJUG/display/BeJUG/ForkJoin+and+Akka
Demo code can be found at http://bit.ly/bejug-fj
INDIAN AIR FORCE FIGHTER PLANES LIST.pdfjackson110191
These fighter aircraft have uses outside of traditional combat situations. They are essential in defending India's territorial integrity, averting dangers, and delivering aid to those in need during natural calamities. Additionally, the IAF improves its interoperability and fortifies international military alliances by working together and conducting joint exercises with other air forces.
Quantum Communications Q&A with Gemini LLM. These are based on Shannon's Noisy channel Theorem and offers how the classical theory applies to the quantum world.
Transcript: Details of description part II: Describing images in practice - T...BookNet Canada
This presentation explores the practical application of image description techniques. Familiar guidelines will be demonstrated in practice, and descriptions will be developed “live”! If you have learned a lot about the theory of image description techniques but want to feel more confident putting them into practice, this is the presentation for you. There will be useful, actionable information for everyone, whether you are working with authors, colleagues, alone, or leveraging AI as a collaborator.
Link to presentation recording and slides: https://bnctechforum.ca/sessions/details-of-description-part-ii-describing-images-in-practice/
Presented by BookNet Canada on June 25, 2024, with support from the Department of Canadian Heritage.
AC Atlassian Coimbatore Session Slides( 22/06/2024)apoorva2579
This is the combined Sessions of ACE Atlassian Coimbatore event happened on 22nd June 2024
The session order is as follows:
1.AI and future of help desk by Rajesh Shanmugam
2. Harnessing the power of GenAI for your business by Siddharth
3. Fallacies of GenAI by Raju Kandaswamy
Quality Patents: Patents That Stand the Test of TimeAurora Consulting
Is your patent a vanity piece of paper for your office wall? Or is it a reliable, defendable, assertable, property right? The difference is often quality.
Is your patent simply a transactional cost and a large pile of legal bills for your startup? Or is it a leverageable asset worthy of attracting precious investment dollars, worth its cost in multiples of valuation? The difference is often quality.
Is your patent application only good enough to get through the examination process? Or has it been crafted to stand the tests of time and varied audiences if you later need to assert that document against an infringer, find yourself litigating with it in an Article 3 Court at the hands of a judge and jury, God forbid, end up having to defend its validity at the PTAB, or even needing to use it to block pirated imports at the International Trade Commission? The difference is often quality.
Quality will be our focus for a good chunk of the remainder of this season. What goes into a quality patent, and where possible, how do you get it without breaking the bank?
** Episode Overview **
In this first episode of our quality series, Kristen Hansen and the panel discuss:
⦿ What do we mean when we say patent quality?
⦿ Why is patent quality important?
⦿ How to balance quality and budget
⦿ The importance of searching, continuations, and draftsperson domain expertise
⦿ Very practical tips, tricks, examples, and Kristen’s Musts for drafting quality applications
https://www.aurorapatents.com/patently-strategic-podcast.html
Are you interested in learning about creating an attractive website? Here it is! Take part in the challenge that will broaden your knowledge about creating cool websites! Don't miss this opportunity, only in "Redesign Challenge"!
Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...Erasmo Purificato
Slide of the tutorial entitled "Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Emerging Trends" held at UMAP'24: 32nd ACM Conference on User Modeling, Adaptation and Personalization (July 1, 2024 | Cagliari, Italy)
How RPA Help in the Transportation and Logistics Industry.pptxSynapseIndia
Revolutionize your transportation processes with our cutting-edge RPA software. Automate repetitive tasks, reduce costs, and enhance efficiency in the logistics sector with our advanced solutions.
The DealBook is our annual overview of the Ukrainian tech investment industry. This edition comprehensively covers the full year 2023 and the first deals of 2024.
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...Chris Swan
Have you noticed the OpenSSF Scorecard badges on the official Dart and Flutter repos? It's Google's way of showing that they care about security. Practices such as pinning dependencies, branch protection, required reviews, continuous integration tests etc. are measured to provide a score and accompanying badge.
You can do the same for your projects, and this presentation will show you how, with an emphasis on the unique challenges that come up when working with Dart and Flutter.
The session will provide a walkthrough of the steps involved in securing a first repository, and then what it takes to repeat that process across an organization with multiple repos. It will also look at the ongoing maintenance involved once scorecards have been implemented, and how aspects of that maintenance can be better automated to minimize toil.
In this follow-up session on knowledge and prompt engineering, we will explore structured prompting, chain of thought prompting, iterative prompting, prompt optimization, emotional language prompts, and the inclusion of user signals and industry-specific data to enhance LLM performance.
Join EIS Founder & CEO Seth Earley and special guest Nick Usborne, Copywriter, Trainer, and Speaker, as they delve into these methodologies to improve AI-driven knowledge processes for employees and customers alike.
7 Most Powerful Solar Storms in the History of Earth.pdfEnterprise Wired
Solar Storms (Geo Magnetic Storms) are the motion of accelerated charged particles in the solar environment with high velocities due to the coronal mass ejection (CME).
Kief Morris rethinks the infrastructure code delivery lifecycle, advocating for a shift towards composable infrastructure systems. We should shift to designing around deployable components rather than code modules, use more useful levels of abstraction, and drive design and deployment from applications rather than bottom-up, monolithic architecture and delivery.
UiPath Community Day Kraków: Devs4Devs ConferenceUiPathCommunity
We are honored to launch and host this event for our UiPath Polish Community, with the help of our partners - Proservartner!
We certainly hope we have managed to spike your interest in the subjects to be presented and the incredible networking opportunities at hand, too!
Check out our proposed agenda below 👇👇
08:30 ☕ Welcome coffee (30')
09:00 Opening note/ Intro to UiPath Community (10')
Cristina Vidu, Global Manager, Marketing Community @UiPath
Dawid Kot, Digital Transformation Lead @Proservartner
09:10 Cloud migration - Proservartner & DOVISTA case study (30')
Marcin Drozdowski, Automation CoE Manager @DOVISTA
Pawel Kamiński, RPA developer @DOVISTA
Mikolaj Zielinski, UiPath MVP, Senior Solutions Engineer @Proservartner
09:40 From bottlenecks to breakthroughs: Citizen Development in action (25')
Pawel Poplawski, Director, Improvement and Automation @McCormick & Company
Michał Cieślak, Senior Manager, Automation Programs @McCormick & Company
10:05 Next-level bots: API integration in UiPath Studio (30')
Mikolaj Zielinski, UiPath MVP, Senior Solutions Engineer @Proservartner
10:35 ☕ Coffee Break (15')
10:50 Document Understanding with my RPA Companion (45')
Ewa Gruszka, Enterprise Sales Specialist, AI & ML @UiPath
11:35 Power up your Robots: GenAI and GPT in REFramework (45')
Krzysztof Karaszewski, Global RPA Product Manager
12:20 🍕 Lunch Break (1hr)
13:20 From Concept to Quality: UiPath Test Suite for AI-powered Knowledge Bots (30')
Kamil Miśko, UiPath MVP, Senior RPA Developer @Zurich Insurance
13:50 Communications Mining - focus on AI capabilities (30')
Thomasz Wierzbicki, Business Analyst @Office Samurai
14:20 Polish MVP panel: Insights on MVP award achievements and career profiling
2. Scala
Functional programming for the imperative mind
‘of the nature of or
expressing a
command;
commanding.’
- imperative. (n.d.).
Dictionary.com
3. Scala
‘imperative
Functional programmingisfor the imperative mind
programming a
programming paradigm
that describes
computation in terms of
statements that change
a program state.’
- Imperative programming
Wikipedia.com
6. What is Scala?
A programming language ...
• Runs on JVM (and .Net)
• Statically typed
• Object Oriented
• Functional
• From scripting to enterprise apps
7. Scalable language
• Scalable language constructs:
• Composition ‘in the small’
• Composition ‘in the large’
• Java interoperability
• Performance on par with Java
8. Scalable language
• Scalable language constructs:
• Composition ‘in the small’
• Composition ‘in the large’
• Java interoperability
• Performance on par with Java
Fuses functional and object oriented paradigms
10. Functional programming
• Focus on functions, not state fx=x+1
• Functions are values vs.
• Recursion, not loops x=x+1
• Immutability (‘referential transparency’)
• Schools of thought:
pure and impure (‘pragmatic’)
11. Functional programming
• Focus on functions, not state fx=x+1
• Functions are values vs.
• Recursion, not loops x=x+1
• Immutability (‘referential transparency’)
• Schools of thought:
pure and impure (‘pragmatic’)
12. Functional programming
• Focus on functions, not state
• Functions are values f g x = g(x)
• Recursion, not loops
• Immutability (‘referential transparency’)
• Schools of thought:
pure and impure (‘pragmatic’)
13. Functional programming
• Focus on functions, not state f0=0
fx=
• Functions are values
f (x - 1)
vs.
• Recursion, not loops for(i=x; i>0
; i--) {
• Immutability (‘referential transparency’)x--; }
• Schools of thought:
pure and impure (‘pragmatic’)
14. Functional programming
• Focus on functions, not state
• Functions are values
• Recursion, not loops
• Immutability (‘referential transparency’)
• Schools of thought:
pure and impure (‘pragmatic’)
15. Functional programming
Why should I care about FP?
• Concurrency: FP ‘killer app’
• Higher order functions: expressiveness boost
• Type-system: when present, often superior
• It is coming to a language near you
(C#, Java 8?)
16. FP in Scala
• First-class functions: functions are objects
with pleasing syntax
• Immutability
• Algebraic data-types and pattern matching
• Parametric polymorphism (e.g. generics)
18. Scala is like Java...
(Generic) classes: class Foo[T], or:
class Foo[+T]
public class Foo<T>
Methods:
def m(s : String) : Unit = ..
public void m(String s) {..}
Bean properties: private Foo foo; Real properties:
getFoo() {..}, setFoo(..) {..} var foo: Foo
Fully interoperable with existing Java
Mature, large amount of proven libraries
code
Class/Interface distinction, single Abstract classes, traits (restricted
inheritance. multiple inheritance)
22. Pure object orientation
Every operation is a method call:
1+3 1.+(3)
Console.println(“hi”) Console println “hi”
23. Pure object orientation
Every operation is a method call:
1+3 1.+(3)
Console.println(“hi”) Console println “hi”
Since operators are methods,
operator overloading is trivial.
24. Pure object orientation
Every operation is a method call:
1+3 1.+(3)
Console.println(“hi”) Console println “hi”
25. Pure object orientation
Every operation is a method call:
1+3 1.+(3)
Console.println(“hi”) Console println “hi”
35. Functional objects
• Functions are first-class values
• Function literals:
(x: Int) => x * 2
val double = (x: Int) => x * 2
36. Functional objects
• Functions are first-class values
• Function literals:
(x: Int) => x * 2
val double = (x: Int) => x * 2
double(2) == 4
What is the type of double?
43. Passing functions
But we can do this with anonymous classes...
Well, sort of... but:
• You need explicit interfaces (no function types)
• Verbose
• Doesn’t scale (syntactically and semantically)
• No true closures:
44. Passing functions
But we can do this with anonymous classes...
Well, sort of... but:
• You need explicit interfaces (no function types)
• Verbose
• Doesn’t scale (syntactically and semantically)
• No true closures:
45. Traits
• Compare trait with abstract class
• No interfaces, but: completely abstract traits
• Can mixin multiple traits, statically and
dynamically
46. Traits as rich interfaces
Java interfaces have two consumers with
conflicting interests:
1) Implementors
2) Users
47. Traits as rich interfaces
Java interfaces have two consumers with
conflicting interests:
1) Implementors
2) Users
48. Traits as stackable
modifications
• Situation: IntQueue interface (abstract trait),
IntQueueImpl implementation
• We want to add logging and filtering to any
IntQueue implementation
49. Traits as stackable
modifications
• Situation: IntQueue interface (abstract trait),
IntQueueImpl implementation
• We want to add logging and filtering to any
IntQueue implementation
50. Traits as stackable
modifications
• Situation: IntQueue interface (abstract trait),
IntQueueImpl implementation
• We want to add logging and filtering to any
IntQueue implementation
59. Actors
• Message-based concurrency
• Actors exchange immutable messages
• Extract them by pattern matching
Looks like language feature, but is a library
60. Other library features
• Enums
• Map ‘syntax’
• Events
• Using ‘keyword’ (e.g. Java 7 ‘automatic
resource management.’)
• Virtually all other Project Coin proposals
61. Other library features
• Enums
• Map ‘syntax’
• Events
• Using ‘keyword’ (e.g. Java 7 ‘automatic
resource management.’)
• Virtually all other Project Coin proposals
62. Other library features
• Enums
• Map ‘syntax’
• Events
• Using ‘keyword’ (e.g. Java 7 ‘automatic
resource management.’)
• Virtually all other Project Coin proposals
63. Other library features
• Enums
• Map ‘syntax’
• Events
• Using ‘keyword’ (e.g. Java 7 ‘automatic
resource management.’)
• Virtually all other Project Coin proposals
Lesson: choose language core wisely,
all else will follow...
64. Lift webframework
In own words:
✓Seaside's highly granular sessions and security
✓Rails fast flash-to-bang
✓Django's quot;more than just CRUD is includedquot;
✓Wicket's designer-friendly templating style
• Heavy use of actors for async features
• Integrated O/R mapping (surprisingly little
boilerplate code)
66. Requirements
• Person entity with age
property
• Method to separate
minors and adults
• Input: List[Person]
• Output: list of minors,
list of adults
• One pass over input
67. Requirements
• Person entity with age
property
• Method to separate
minors and adults
• Input: List[Person]
• Output: list of minors,
list of adults
• One pass over input
69. Scala progression
• Current version: 2.7.4
• Version 2.8 beta coming up:
• Package objects
• Named and default parameters
• Many library improvements
70. Tool support
• Major IDEs (Eclipse,
IntelliJ, NetBeans)
supported
• Maven support
• Scaladoc
• SBaz package manager
74. Scala hitting mainstream?
Reports of first switchers
Twitter, SAP, LinkedIn, Sony Pictures
April 2009: top-30 of TIOBE index
Lots of books appearing
75. Scala hitting mainstream?
“If I were to pick a language today
other than Java, it would be Scala”
James Gosling,
‘Father of Java’
76. Scala hitting mainstream?
“If Java programmers want to use
features that aren't present in the
language, I think they're probably best
off using another language that targets
the JVM, such a Scala and Groovy.”
Joshua Bloch
Author of ‘Effective Java’
77. Pro’s and cons
• Complexity
• Java interoperability
• Java -> Scala
• Hides accidental
complexity harder than
Scala -> Java
• Expressiveness
• Type-system may
• Uniform, extensible be intimidating
language
78. Conclusion
• Scala feels like ‘cleaned up Java on stereoids’
• Small core (takes some time to see it as such)
provides broad options
• Type inference brings ‘dynamic language’ feel
• Adoptation growing because of:
• Java interoperability
• Growing discontent with Java
79. Conclusion
• Scala feels like ‘cleaned up Java on stereoids’
• Small core (takes some time to see it as such)
provides broad options
• Type inference brings ‘dynamic language’ feel
• Adoptation growing because of:
• Java interoperability
• Growing discontent with Java
Scala provides deep features, but at the
same time helps getting things done.
80. More
information
http://www.scala-lang.org
http://liftweb.net
Article Java Magazine 1/2009
Intro, gaan het hebben over Scala
Wellicht al eens gehoord over FP, lijkt groeiende interesse
wat is imperatief? Ook wel procedureel, met state, het is wat we in Java eigenlijk doen.
Intro, gaan het hebben over Scala
Wellicht al eens gehoord over FP, lijkt groeiende interesse
wat is imperatief? Ook wel procedureel, met state, het is wat we in Java eigenlijk doen.
Intro, gaan het hebben over Scala
Wellicht al eens gehoord over FP, lijkt groeiende interesse
wat is imperatief? Ook wel procedureel, met state, het is wat we in Java eigenlijk doen.
Odersky: co-designer generics, original author javac.
Wellicht had hier oracle logo moeten staan :)
*Voordelen JVM (enorm veel tijd in optimalisatie, platform agnostisch etc.), ook wat nadelen (niet echt ingericht op FP constructies).
* OO, maar dan ook puur, en met extra functionaliteit
* Scripting: REPL shell
Scala redelijk uniek in samenvoegen OO+FP
OCaml en F# zijn toch meer FP met een OO systeem er aan geplakt.
Recursie niet alleen in functies, ook in data (bomen, lijsten)
Recursie niet alleen in functies, ook in data (bomen, lijsten)
Recursie niet alleen in functies, ook in data (bomen, lijsten)
Recursie niet alleen in functies, ook in data (bomen, lijsten)
Recursie niet alleen in functies, ook in data (bomen, lijsten)
Recursie niet alleen in functies, ook in data (bomen, lijsten)
Recursie niet alleen in functies, ook in data (bomen, lijsten)
Recursie niet alleen in functies, ook in data (bomen, lijsten)
Recursie niet alleen in functies, ook in data (bomen, lijsten)
Recursie niet alleen in functies, ook in data (bomen, lijsten)
Recursie niet alleen in functies, ook in data (bomen, lijsten)
Nieuwe paradigma’s hebben killer-app nodig
OO had GUIs, bij FP concurrency?
Typesysteem: niet noodzakelijk voor FP, traditioneel wel focus
Zonder diep in te gaan, voor we features gaan bekijken, dit is hoe Scala FP bevat.
*default modifier is public
*Type after identifier, type Unit == void
*zowel Scala->Java als Java->Scala interop. Dus, elkaars classes instantieren overerven etc.
*Abstract class ipv interfaces
Extenden van Java class (extends ook voor interfaces)
Type Unit -> void in Java
hashCode -> hashCode() , haakjes weglaten.
Soort van autoboxing, maar beter
* + is methode naam, kan je zelf op een class implementeren
* Leestekens legale identifiers in Scala
* Operator notatie ook te gebruiken met ‘normale’ methode namen
* In Java discussie: operator overloadig BigInts (en wat voor matrix etc.)? Scala: just do it.
* + is methode naam, kan je zelf op een class implementeren
* Leestekens legale identifiers in Scala
* Operator notatie ook te gebruiken met ‘normale’ methode namen
* In Java discussie: operator overloadig BigInts (en wat voor matrix etc.)? Scala: just do it.
* + is methode naam, kan je zelf op een class implementeren
* Leestekens legale identifiers in Scala
* Operator notatie ook te gebruiken met ‘normale’ methode namen
* In Java discussie: operator overloadig BigInts (en wat voor matrix etc.)? Scala: just do it.
* + is methode naam, kan je zelf op een class implementeren
* Leestekens legale identifiers in Scala
* Operator notatie ook te gebruiken met ‘normale’ methode namen
* In Java discussie: operator overloadig BigInts (en wat voor matrix etc.)? Scala: just do it.
* + is methode naam, kan je zelf op een class implementeren
* Leestekens legale identifiers in Scala
* Operator notatie ook te gebruiken met ‘normale’ methode namen
* In Java discussie: operator overloadig BigInts (en wat voor matrix etc.)? Scala: just do it.
*Java statics niet echt OO. Scala: Classes->te instantieren, singleton objects->één instantie
*Zelfde naam: companions -> toegang tot private members
*haakjes mogen weg bij methode aanroep zonder params; puntkomma’s ook optioneel!
*main methode op object Main, entrypoint applicatie
* Vorige slide goed opgelet: geen return type!
* Zijn natuurlijk allemaal op ISKA over closures geweest, maar toch een opfrisser
* Java heeft Anon. classes -> beperkingen, verbose (interface nodig), daarom weinig gebruikt
* Zijn natuurlijk allemaal op ISKA over closures geweest, maar toch een opfrisser
* Java heeft Anon. classes -> beperkingen, verbose (interface nodig), daarom weinig gebruikt
* Zijn natuurlijk allemaal op ISKA over closures geweest, maar toch een opfrisser
* Java heeft Anon. classes -> beperkingen, verbose (interface nodig), daarom weinig gebruikt
* Zijn natuurlijk allemaal op ISKA over closures geweest, maar toch een opfrisser
* Java heeft Anon. classes -> beperkingen, verbose (interface nodig), daarom weinig gebruikt
* Function0 tot Function22 op deze manier beschikbaar
* Function0 tot Function22 op deze manier beschikbaar
* Function0 tot Function22 op deze manier beschikbaar
* Function0 tot Function22 op deze manier beschikbaar
* Function0 tot Function22 op deze manier beschikbaar
* Function0 tot Function22 op deze manier beschikbaar
* Function0 tot Function22 op deze manier beschikbaar
Scala gaat nog verder, zelf control structures maken (by-name params)
* First trait/class with extends, then 0 or more times with
* Traits can have any member: defs, abstract defs, fields traits can extend from each other
* Traits are used in this fashion a lot for the Scala collection libs
* abstract override: target of super not known at design-time!
* calls resolve right-to-left
* selftype annotation: type of this can assume type of class where trait is mixed in!
* abstract override: target of super not known at design-time!
* calls resolve right-to-left
* selftype annotation: type of this can assume type of class where trait is mixed in!
* abstract override: target of super not known at design-time!
* calls resolve right-to-left
* selftype annotation: type of this can assume type of class where trait is mixed in!
* geen new keyword nodig: case class is class + companion object met apply method!
* Sealed abstract class: compiler kan checken of alle cases gedekt zijn
* geen new keyword nodig: case class is class + companion object met apply method!
* Sealed abstract class: compiler kan checken of alle cases gedekt zijn
* geen new keyword nodig: case class is class + companion object met apply method!
* Sealed abstract class: compiler kan checken of alle cases gedekt zijn
* Twee doelen: selecteren goede case, en binden van variabelen in 1 stap
* Java kent heeeel beperkte pattern matching: catch-clauses
* Geen NPE: helaas heeft Scala wel null, vanwege compatibility -> tradeoff
* voorbeelden van option: Map.get, List.find, parseInt, etc.
* Twee doelen: selecteren goede case, en binden van variabelen in 1 stap
* Java kent heeeel beperkte pattern matching: catch-clauses
* Geen NPE: helaas heeft Scala wel null, vanwege compatibility -> tradeoff
* voorbeelden van option: Map.get, List.find, parseInt, etc.
* match is an expression too
* Of course case objects can be used to implement enums
* Of course case objects can be used to implement enums
* Of course case objects can be used to implement enums
* Of course case objects can be used to implement enums
* Of course case objects can be used to implement enums
Ook test frameworks
Proberen stukje realworld code van Java->Scala als Java programmeur->Idiomatische Scala
* TIOBE top-30: beating Groovy, Haskell
* TIOBE top-30: beating Groovy, Haskell
Java -> Scala voorbeeld: een Scala - methode wordt vertaald naar $minus$.
Veel conventies voor compiler gegenereerde classes.