The Artima Developer Community
Sponsored Link

Programming in Scala Forum
Chapter 9 Example

5 replies on 1 page. Most recent reply: Aug 25, 2009 8:08 PM by Larry K

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 5 replies on 1 page
Juan Miguel Garcia Lopez

Posts: 4
Nickname: sammalone
Registered: Dec, 2007

Chapter 9 Example Posted: Jan 4, 2008 10:33 AM
Reply to this message Reply
Advertisement
It seems to me that there are two schools when it comes to deciding what type of examples should be included in a book. There is the "big application", which requires you to understand the requirements for an application which will be developed thoroughout the boook. And then there is the "Easy examples, please" school, which presents new features by using very simple examples.

Now, everyone has different opinions on this matter, but I am definitely with the "Easy examples" side. I dont want to understand the requirements for an application, I want to learn a language. These requirements are a distraction from the real goal.

And I think that you have been doing a great job until I started reading Chapter 9, which starts with " this chapter presents a simple algebra of two-
dimensional layout elements". This is when I stopped trying to understand the examples in the chapter.

I think you should seriously consider rewrite the chapter with another example. I know, the code is not rocket science, it can be understood if you make an effort. But the thing is that I dont want to. I want to learn Scala, and I am not interested in "algebras of two dimensional layout elements".

In fact, there is an example which confirms my point of view. In page 178, you include the code for the besides method, the one which uses zip. Then you explain what zip does by using another example, a pretty easy to understand one. And the reason is that besides is not easy to understand.

Please keep examples very very simple.


Scot McSweeney-Roberts

Posts: 1
Nickname: 53171
Registered: Jan, 2008

Re: Chapter 9 Example Posted: Jan 7, 2008 5:24 AM
Reply to this message Reply
I have similar feelings about the example in Chapter 11 (manipulating arithmetic expressions as examples of case classes and pattern matching). I see the phrase "arithmetic expressions" and switch off.

Javier Diaz Soto

Posts: 29
Nickname: javierbds
Registered: Sep, 2005

Re: Chapter 9 Example Posted: Jan 22, 2008 4:15 AM
Reply to this message Reply
Well, the examples are tied to one another in several chapters ...
I miss some 2D boxes diagrams for the visually deprived ... The utility of the chapter is not fully realized until much later, so something to make it more "attractive" would be good.

Javier Diaz Soto

Posts: 29
Nickname: javierbds
Registered: Sep, 2005

Re: Chapter 9 Example Posted: Jan 22, 2008 5:38 AM
Reply to this message Reply
I, on the other hand, found myself writing more and more elaborate cases for expression simplification ...

jeroen dijkmeijer

Posts: 6
Nickname: 53764
Registered: Jan, 2008

Re: Chapter 9 Example Posted: Feb 8, 2008 6:26 AM
Reply to this message Reply
Actually I'm not so put off by these examples, I've had some education in Lisp and examples there were actually of the same type as the algorithmic and box layout examples. I think its more or less inherent to functional programming, but I agree that it remains a bit academic.
It would be nice though if a few examples could be brought on to "real business" like use cases, possibly in combination with an orm tool like hibernate. Combinations of clusures and the hql/ejb-ql/jpa-ql will be very powerful, although you run big risk of chasing the topic starter away.

Larry K

Posts: 4
Nickname: ldk
Registered: Aug, 2009

Re: Chapter 9 Example Posted: Aug 25, 2009 8:08 PM
Reply to this message Reply
I agree with the school of thought of having simple examples. I have programming experience in a few languages, including Java, but I am not a guru. Seems I need to study some of the examples very hard to make sense out of them. It gives me a headache! :-(
Just remember the KISS: => Keep It Simple Stupid
Thanks!

Flat View: This topic has 5 replies on 1 page
Topic: Currency example page 337 Previous Topic   Next Topic Topic: BigInteger Example -- getting error

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use