Personally I think that Python is great for small simple things, but  
as soon as you start to scale the lack of statically checked  
guarantees starts to bite you. The larger and larger you get the more  
often and more subtle the bites get. Conversely, with a rigorous  
statically checked language, you can start to use the static checking  
in your favor. And, the more you understand the nuances of the type  
system the more and more you can form it to give you even stronger and  
stronger guarantees.

Anecdotally, Haskell (which is perhaps one of the most advanced  
functional programming languages on the planet, particularly in the  
type system department) has regular reports in the mailing list from  
newbies that usually go from "wtf" to "whenever I get the compiler to  
accept my program, it usually just works" in a fairly short time.

The syntax of Scala is an interesting and convoluted beast straddling  
an unusual line between more typical functional programming languages  
(Haskell, O'Caml, etc) and Java, and overall I think it ends up doing  
a fairly good job, though it does have its confusing parts.

The ability to define operators in particular is a very tricky  
subject. I find, along with implicits, that I treat it as a power tool  
that should only be used in cases where it really makes quite alot of  
sense (used extremely frequently, coming from math concepts, etc).  
Luckily, it is fairly easy to find out where operators are coming from  
-- if it looks like an operator, then check to see if it has a :  
(colon), if it does, the thing on the right is where the operator is  
defined, so look in its doc. Otherwise, it's the thing on the left  
that has the operator, so look there.

If neither place has the operator, then unfortunately you've just  
strayed into implicit conversion territory, which is unfortunately  
tricky to track down in many cases. Sometimes in that situation the  
scala REPL will help, because it prints out the types of expressions.

Coming from a background of knowing Java and Haskell (along with  
Python and many other languages, not apropos to this discussion) I  
found the syntax of Scala to initially be inscrutable but I warmed to  
it after a month or two and now I think it's pretty good.

Regarding () and {} BTW, you can replace a single-argument argument  
list with {}, e.g.

def myFunction(a: String): Unit = println(a)

myFunction("foobar")
myFunction { "foobar" }

The two calls are equivalent. It makes more sense with the latter  
format with multiple argument lists or DSL-like things. I could write  
up an example if you're interested, but it might be somewhat involved  
if you're not familiar with Scala or Lift.

Overall, my suggestion would be to stick with it and ask questions. I  
think it's worth it, and the people here are really helpful.

-Ross

On Oct 22, 2009, at 5:39 PM, jlist9 wrote:

>
> Just want to add to this. web.py is a Python web development framework
> that I like a lot, for its simplicity. In about 10 lines of code you  
> can have
> a complete, albeit simple, web application. No XML whatsoever.
>
> http://webpy.org/
>
> Hope no one is offended by my mentioning a Python web framework on
> Lift list. Just want to say that things can be short and simple as  
> well
> as easy to understand and easy to use.
>
> Of course the dynamic languages have their known issues, which is
> what drives me to Scala and Lift.
>
>> And too few operators leads to a whole lot of words, which leads to  
>> a whole
>> lot of typing, or a whole lot of ctrl-space completions.  It's a  
>> toss up.
>> The wordy way is definitely noob friendly, while the operator way  
>> is more
>> expert friendly.
>> Which do you design a language for?  Let me know when that particular
>> religious war dies down please.
>> As someone who slings code for a living.... the less I type the  
>> happier I
>> am..... YMMV
>
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to