4

I've been asked to give a scala workshop to a PHP audience. A lot of these people never had any contact with a functional programming language at all, so I was wondering how to introduce them in a way so they get the most out of it.

I heard that a lot of people have a hard time understanding high order functions etc.

What are your experiences? I don't want to scare them off with too advanced stuff nor do I want to bore them to death.

The workshop will be approximately be 3 hours long with about 10 attendees.

Thanks for your input.

Regards, raichoo

raichoo
  • 2,557
  • 21
  • 28

3 Answers3

2

I suggest following some of the advices at Sneaking Scala Into Your Organization.

But before that make sure to show the implications of a static type systems and how inference makes lot of type annotations unnecessary.

For function programming don't forget to define important things like clousures, lambdas (anonymous functions) and how they fit in Scala's OO.

pedrofurla
  • 12,763
  • 1
  • 38
  • 49
1

Take a look at these slides. I can't tell if they're the most appropriate slides for a PHP audience, but I've always thought that Jonas Boner hits the spot with his presentations. You might want to integrate topics covered here into the workshop, as they are oriented towards the practical aspects of the language.

axel22
  • 32,045
  • 9
  • 125
  • 137
1

Programming Scala by Martin Odersky has a number of examples that start with an imperative style and then go through the steps of making it functional.

It helps a great deal if you're not used to functional programming to start with "normal" code and translate it, rather than thinking functionally straight away.

leonm
  • 6,454
  • 30
  • 38
  • 1
    "empirical" style? Don't you mean "imperative"? – Nicolas Payette Feb 16 '11 at 18:55
  • Starting in an "imperative" style and later translating it into functional programs is a little bit like walking with crutches. The crowd is highly motivated and a want to bring the point across that a lot of "unlearning" will be necessary to get the most out of it. I had a hard time to cast off those crutches because I got used to them pretty quickly. – raichoo Feb 20 '11 at 13:20