background preloader

Scala

Facebook Twitter

Scala: the flying sandwich parts. JavaScript existed since 1995 long before 'JavaScript: The Good Parts' (2008), jQuery (2006), and V8 (2008) happened. The interesting thing about Douglas Crockford's 'The Good Parts' is that unlike the other additive work, it's a book about subtracting features from the language. I've been thinking about exploring a subset of Scala in a wonderland setting without the "real world" constraints such as Java familiarity and interoperability. If using Scala as an alternative Java is acceptable, why not try using it as an alternative functional programming language?

Another point of this thought experiment is to see some of the duplicate constructs can be reduced. In this article, I'm not interested in finding out the idiomatic way, or calling something good or bad. I'm calling this The Flying Sandwich Parts (TFSP). values What talk you of the posy or the value? The Scala Language Specification describes a value as follows: lazy vals pattern definition avoid vars expressions literals no nulls traits. Scaling up with Akka and Scala – How we Help - Typesafe. Compile Scala to JavaScript With Scala.js. At the Scala Day last week, Sébastien Doeraene presented Scala.js, a Scala to JavaScript compiler. The compiler supports the full Scala language allowing its users to build web applications front to back in Scala and potentially reuse code between the server and the client. Scala code written for Scala.js can interact with existing JavaScript code either in a dynamically typed manner, or in a statically typed manner.

The former is more flexible: access is provided to the global (window) object and arbitrary properties can be accessed and method called. However, this does not leverage the statically typed nature of Scala. Alternatively, typed signatures of JavaScript libraries can be provided. For instance for jQuery: These types are used by the compiler to do type checking and to provide code completion in IDEs. jQuery("#button").click { () => val paragraph = jQuery("<p>").html("Hello World! ") It is also possible to call Scala generated code from JavaScript. This week in #Scala (10/06/2013) The Python Tutorial — Python v2.7.4 documentation. Python is an easy to learn, powerful programming language.

It has efficient high-level data structures and a simple but effective approach to object-oriented programming. Python’s elegant syntax and dynamic typing, together with its interpreted nature, make it an ideal language for scripting and rapid application development in many areas on most platforms. The Python interpreter and the extensive standard library are freely available in source or binary form for all major platforms from the Python Web site, and may be freely distributed. The same site also contains distributions of and pointers to many free third party Python modules, programs and tools, and additional documentation. The Python interpreter is easily extended with new functions and data types implemented in C or C++ (or other languages callable from C).

This tutorial introduces the reader informally to the basic concepts and features of the Python language and system. Programming in Scala, First Edition. Programming in Scala, First Editionby Martin Odersky, Lex Spoon, and Bill VennersDecember 10, 2008 Martin Odersky made a huge impact on the Java world with his design of the Pizza language. Although Pizza itself never became popular, it demonstrated that object-oriented and functional language features, when combined with skill and taste, form a natural and powerful combination. Pizza's design became the basis for generics in Java, and Martin's GJ (Generic Java) compiler was Sun Microsystem's standard compiler starting in 1.3 (though with generics disabled).

I had the pleasure of maintaining this compiler for a number of years, so I can report from first-hand experience that Martin's skill in language design extends to language implementation. Since that time, we at Sun tried to simplify program development by extending the language with piecemeal solutions to particular problems, like the for-each loop, enums, and autoboxing. Will Scala be the next great language? How to use this book. Scala Standard Library API (Scaladoc) 2.10.1 - root - Scala Standard Library API (Scaladoc) 2.10.1 - _root_ 'scala' tag wiki. Introduction. Scala is a modern multi-paradigm programming language designed to express common programming patterns in a concise, elegant, and type-safe way. It smoothly integrates features of object-oriented and functional languages. Scala is object-oriented Scala is a pure object-oriented language in the sense that every value is an object.

Types and behavior of objects are described by classes and traits. Classes are extended by subclassing and a flexible mixin-based composition mechanism as a clean replacement for multiple inheritance. Scala is functional Scala is also a functional language in the sense that every function is a value. Furthermore, Scala’s notion of pattern matching naturally extends to the processing of XML data with the help of right-ignoring sequence patterns.

Scala is statically typed Scala is equipped with an expressive type system that enforces statically that abstractions are used in a safe and coherent manner. Scala is extensible Scala interoperates with Java and .NET. Scala School. Other Languages: About Scala school started as a series of lectures at Twitter to prepare experienced engineers to be productive Scala programmers. Scala is a relatively new language, but draws on many familiar concepts. Thus, these lectures assumed the audience knew the concepts and showed how to use them in Scala. We found this an effective way of getting new engineers up to speed quickly. Approach We think it makes the most sense to approach teaching Scala not as if it were an improved Java but instead as a new language. Most of the lessons require no software other than a Scala REPL.

Also You can learn more elsewhere: Glossary. Programming Scala. Scala in Depth. Scala in Depth is a unique new book designed to help you integrate Scala effectively into your development process. By presenting the emerging best practices and designs from the Scala community, it guides you through dozens of powerful techniques example by example.

Scala is a powerful JVM language that blends the functional and OO programming models. You'll have no trouble getting introductions to Scala in books or online, but it's hard to find great examples and insights from experienced practitioners. You'll find them in Scala in Depth. There's little heavy-handed theory here—just dozens of crisp, practical techniques for coding in Scala. Josh Suereth is a software developer with Typesafe. “A book that will help you transition from tinkering in Scala to professionally programming with it.”

“A thorough treatment of the subject ... best suited for those who strive to become experts in Scala.”