|
Re: assorted beginner questions: msg#00494lang.scala
Imam Tashdid ul Alam <uchchwhash@xxxxxxxxx> writes: > 1. when I create an object, there are two class files > generated. why? Run javap and take a peak at them. If I remember right, one is the real code for the object, and the other is a bunch of static forwarders which do two things: (1) hold the single instance of the object, and (2) provide handy forwarders for access from Java. > 2. I want to view an array as a list. how do I do > that? I don't want the array to be copied. just > _viewed_ as a list. Normally you'd either use it as an array (or one of its supertypes, like Seq or Iterable), or you'd do toList. If you are processing the whole thing, anyway, then toList is as good as you can probably do. > 3. I want my colleagues to use my Scala code. my code > abuses the Scala freedom to the max. so my methods all > look like ::, :\ or ? ... but the problem is, my > colleagues use Java. how do they use my Scala library? If they are programming in Java, then the safest way to give them a good API is to write the API using Java interfaces, and then implement those interfaces in your Scala code. If they are programming in Scala.... just ease them in, gently. :) > 4. XML literals embed Scala code surrounded by {}. how > do I embed the '{' and '}' characters in my XML? {{ and }} -Lex |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: assorted beginner questions: 00494, Lex Spoon |
|---|---|
| Next by Date: | Re: assorted beginner questions: 00494, Lex Spoon |
| Previous by Thread: | Re: assorted beginner questionsi: 00494, Imam Tashdid ul Alam |
| Next by Thread: | Re: assorted beginner questions: 00494, Yang |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |