by ittayd
border:

This is a short post about an experience I had where the loss of type safety caused a nasty bug.

 

Look at the following code:

val tenYearsFromNow:Long = System.currentTimeMillis + 10 * 365 * 24 * 60
* 60 * 1000

 

It has a bug. Can you spot it?

 

The bug is that 10 * 365 * 24 * 60 * 60 * 1000 is computed as an integer and oveflows. tenYearsFromNow then holds a value that is twenty days from now.

 

by ittayd
border:

A series introducing Scala to Java programmers.

by ittayd
border:

snakked is a Scala library to extract information from a few formats (xml, json, beans) retrieved via URL / file.

by ittayd
border:

Dependent types is a term that describes using values as types.  This means you can encode some properties of an object in its type. Once you do that, it allows a type checker (a compiler) to verify that the object (type) is used in a suitable way.

 

For a trivial example, imagine that Scala's AnyRef would have been defined as: 

AnyRef[Null <: TBoolean]

 

Where TBoolean is:

trait TBoolean
trait TTrue extends TBoolean
trait TFalse extends TBoolean

 

by andrew
tags:
border:

Here is a short article, discussing some reasons, why Scala may seem more complicated than it is to beginners.

 

I think, the most important item is the show-off factor. Not only in blogs, but also in code people try to demonstrate the most advanced Scala feature they learned recently.

 

by ittayd
border:

http://www.propensive.com/rapture.txt

 

With rapture you create web applications by creating a Scala class that extends Cloudlet. The class can then define routes (URL patterns) to reply to as well as configure its scaling (how many nodes to use)

by ittayd
border:
by ittayd
border:
by ittayd
border:

http://scala-boss.heroku.com/

 

This presentation tries to introduce Scala from a more business orieneted point of view. Meaning, concentraiting on things like faster-delivery and less bugs rather than "cool" features of the language.

by ittayd
border:

Many times when trying to explain delimited continuations in Scala, a code example is shown and then explained. Usually this creates confusion since the client code feels unnatural but more importantly, doesn't give an intuition of when to decide to use delimited continuations in our own code.

 

The intuition I have is that when I have a function that accepts functions, and the resulting client code means several levels of nesting such functions, then DC can help.

 

Let's see a familiar example:

Pages