Scala?
Moderators: silly freak, CCGHQ Admins
Scala?
by silly freak » 21 Aug 2010, 17:52
(I tried IDEA shortly, but I didn't feel comfortable with it. However irrational this may sound, it's just what it felt like. Besides either getting used to the different key bindings etc. or customizing them, I got a class path problem because the JDK wasn't put on the classpath by default.)nantuko84 wrote:I have some experience with Scala. why are you planning to use it in laterna?
btw, idea scala plugin is much better and more stable.
right now, two things come to mind where scala would really be great:
One, filtering using anonymous functions/match statements. if you look at net.slightlymagic.laterna.magica.util, the classes MagicaPredicates, MagicaFunctions, MagicaSuppliers mostly just handle this problem. They would still exist of course, but would be much shorter and clearer.
Two are the concurrency features, especially applied to the GuiActor class:
- Code: Select all
private boolean ready;
private PlayAction a;
public synchronized void putAction(PlayAction a) {
ready = true;
this.a = a;
notifyAll();
}
public synchronized PlayAction getAction() {
ready = false;
while(!ready)
try {
wait();
} catch(InterruptedException ex) {
ex.printStackTrace();
}
return a;
}
___
where's the "trust me, that will work!" switch for the compiler?
Laterna Magica - blog, forum, project, 2010/09/06 release!
where's the "trust me, that will work!" switch for the compiler?
Laterna Magica - blog, forum, project, 2010/09/06 release!
- silly freak
- DEVELOPER
- Posts: 598
- Joined: 26 Mar 2009, 07:18
- Location: Vienna, Austria
- Has thanked: 93 times
- Been thanked: 25 times
Re: Scala?
by Snacko » 23 Aug 2010, 09:12
You can use jetlang to write actors for java with little code, however Java always is verbose and sometimes it's a bit too much compared to Scala.
Re: Scala?
by silly freak » 23 Aug 2010, 16:09
thanks for the tip, works great so far
___
where's the "trust me, that will work!" switch for the compiler?
Laterna Magica - blog, forum, project, 2010/09/06 release!
where's the "trust me, that will work!" switch for the compiler?
Laterna Magica - blog, forum, project, 2010/09/06 release!
- silly freak
- DEVELOPER
- Posts: 598
- Joined: 26 Mar 2009, 07:18
- Location: Vienna, Austria
- Has thanked: 93 times
- Been thanked: 25 times
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest