Week2: Circuit Simulation, Wires

This week's first 3 videos are a introduction to state management inside a functional language, actually I can't read slides from video one, so I'll give you a Bank Account conversion in Clojure as soon as the slide will be out. In the second and the third video there isn't any code that can be usefull written in clojure (actually I can't understand what I had to learn from the third video... ). In the other videos video Martin start the implementation of a domain specifil language to simulate circuits.
This are the Wires, rewritten in Clojure:
Actually I'm thinking a lot on differences beetween this two languages.
I think that to create DSL Scala has the huge advantage of type system, but I think that if we can build these kind of DSL we will be in jail...
One great programmer in each society that will build the DSL, and all low-profile programmer that will use it without knowing anything of real Scala.
Another little consideration. What the heck is this O_o:
Ok the Scala's match is AWESOME, I said it in another post. But this is quite confusing, I had to watch the video 3 times to understand what was appening, in Clojure that are a lot of parenthesis, and someone can be frustrated from it, but here we need some parenthesis. The part with <= => it's very horrible in my opinion.
For now It's all :D, I'll come soon with the rest of Circuit implementation.

PS: The assignment will be quite a challenge .. there is also a Display for the Epidemic Simulation... I need days of 30 hours ....

Comments