Skip to main content



      Home
Home » Modeling » TMF (Xtext) » OAW to TMF - Scala EMF
OAW to TMF - Scala EMF [message #49994] Thu, 11 June 2009 07:12 Go to next message
Eclipse UserFriend
I've been reading the OAW to TMF migration document and the comment is
made:
"Also without changing the EMF generator it is inconvenient to use EMF
classes in Scala, since Scala uses a different convention for getter and
setter methods."

Slightly off topic but can someone please elaborate on what you mean here?
I've done some Scala EMF work both with the generated and reflective EMF
classes and found that using Scala is similar to Java but less verbose due
to Scala's type inference. I'm aware of Scala's automatic getter/setter
approach to implementing class attributes as properties. Where is the
inconvenience with EMF?
Re: OAW to TMF - Scala EMF [message #50114 is a reply to message #49994] Thu, 11 June 2009 08:58 Go to previous message
Eclipse UserFriend
I tried to state that it would be nice to have scala-like accessors in
order to write

foo.myProp instead of foo.getMyProp().

i.e. have methods myProp() and myProp_(PropType)

That's all.
Of course one can use getMyProp and setMyProp as in Java.
I've removed that line, since it's only inconvenient compared to Xtend
not when comparing to Java.

Thanks,
Sven

Porter schrieb:
> I've been reading the OAW to TMF migration document and the comment is
> made:
> "Also without changing the EMF generator it is inconvenient to use EMF
> classes in Scala, since Scala uses a different convention for getter and
> setter methods."
>
> Slightly off topic but can someone please elaborate on what you mean here?
> I've done some Scala EMF work both with the generated and reflective EMF
> classes and found that using Scala is similar to Java but less verbose
> due to Scala's type inference. I'm aware of Scala's automatic
> getter/setter approach to implementing class attributes as properties.
> Where is the inconvenience with EMF?
>
Previous Topic:download for RC3 fails
Next Topic:[Xtext] Formatter/Pretty Printer needed
Goto Forum:
  


Current Time: Wed Apr 16 10:58:06 EDT 2025

Powered by FUDForum. Page generated in 0.02097 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top