jlist9 wrote:
> It's often hard to describe some (I'd say most) of the Scala syntax
> if you want to search for an answer online.

I can't relate with that. I've been coding scala for 3-4 months, and 
I've never had any problem finding method definitions. Most of this 
probably had to do with that fact that I was reading through several 
language overviews and tutorials.

> It would be great if the eclipse plugin can tell you what the code is
> trying to do and what kind of syntax is that, for example, linking
> an operator back to a method name.

I'll repeat: there are no operators in scala. Not a single one. "linking 
an operator back to a method name" doesn't make sense. Accept that 
_everything_ in scala, except methods, is an object, and as such adheres 
to its respective class contract. If you need to look up the meaning of 
an "operator," all you need to know is the type on which it is being 
invoked. The only real complexity in this resolution then is introduced 
by implicits.

> 
> On Fri, Oct 23, 2009 at 6:27 AM, bob <rbpas...@gmail.com> wrote:
>> i believe that one of the best ways to learn a new programming
>> language is to read software written in it
>>
>> when reading Scala code, I rarely say "i don't understand how that
>> works" and when I do, there's usually a good explanation of it
>> somewhere on the web.
>>
>> usually I find myself asking "where is that defined?" or "what part of
>> the language is that?"
>>
>> Scala is not like, for example, BASIC, where you can look up FOR, IF/
>> THEN/ELSE. there's lots of individual and compound punctuation marks
>> that are very difficult to search for online and in PDFs (try
>> searching for "!").
>>
>> a lot of scala also relies on syntactic sugar, such as omitted types
>> (no ": T" after a val/var/def); the dreaded underbar; operator
>> overloading; and implicit conversions. you can hate on Java's
>> verbosity (i know i have), but brevity has its own difficulties.
>>
>> On Oct 22, 11:44 pm, Naftoli Gugenheim <naftoli...@gmail.com> wrote:
>>> The last use of _, as in empty_?, is not a special scala meaning. As on 
>>> Java, underscores can be part of an identifier. Scala takes advantage of 
>>> this to combine letters and symbols in one name. These names, like empty_?, 
>>> are a Lift convention, as well as ..._! for use-with-care methods. The 
>>> scala library uses isEmpty. David, is it your original convention?.
>>>
>>> -------------------------------------
>>>
>>> tiro<tim.romb...@googlemail.com> wrote:
>>>> override def validations = validPriority _ :: super.validations
>>> funny, I had stumbled on exactly the same line of code when beginning.
>>> Took me more than a day to understand what's going on. Especially
>>> because when you copied code from the PDF version of the Liftbook/Lift
>>> getting started guide, it would mess up spaces, so I would keep
>>> loooking for a "_::" operator.
>>> The Scala guys have really pushed it a bit hard on the use of the
>>> underscore. At least four different uses:
>>> - "it" for defining anonymous functions like above
>>> - default value
>>> - matching placeholder whose value is ignored
>>> - use for constructing setter method names boolean functions (empty_?)
>>>
> 
> > 
> 

--~--~---------~--~----~------------~-------~--~----~
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