jeudi 10 janvier 2013

As a new dev version of the Ceylon Eclipse IDE was pushed, let's play with the syntax

[String,Number,Boolean,String] fooBarTuple = ["foo",1,true,"bar"];// can be seen as a sequence with this syntax[Number|String|Boolean...] fooBarSequence = fooBarTuple;// or this alternate sequencer[] fooBarSequenceAlternate = fooBarTuple;// can be seen as an iterable{Number|String|Boolean...} fooBarIterable = fooBarSequence;// create a new tuple with the first tuple [Number,String,Number,Boolean,String] fooBarTuple42 = [42,fooBarTuple...];// or a new iterable{Number|String|Boolean...} fooBarIterable42 = {42,fooBarTuple42...};// This is too verbose : define an aliasinterface MyHeterogenousType => [Number|String|Boolean...];MyHeterogenousType seenAsMyType = fooBarSequence;// or use type inferencecomputevalue fooBarTupleValue = fooBarTuple;Boolean vrai = fooBarTupleValue[2];

lundi 12 juillet 2010

Once again, plenty of interesting things, this time all about Scala (not about Java)

During the podcast several people said that it was a very bad idea to try to learn Scala using Lift as a training material because it is way too functional for a beginner (in the functional programming acception of the term)

Well, maybe I should try Lift now, to check if I begin to understand functional programming in general, and in especialy in Scala.