Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » xbase: LongExtensions
xbase: LongExtensions [message #810801] Thu, 01 March 2012 15:19 Go to next message
Vlad Dumitrescu is currently offline Vlad DumitrescuFriend
Messages: 431
Registered: July 2009
Location: Gothenburg
Senior Member
Hi!

I read previous posts about why the library provides extensions only for regular integers (it's easy to add then oneself, the language is not for number crunching), but I hope that I might at least make the case for the long integers.

"long" is used here and there, most notably in System::currentTimeMillis(), and it's surprising that one can't do any math on them. The biggest problem is when one has commited to implement a class in Xtend and after a few hours of work one notices a glitch like this...

LongExtensions would be a trivial search and replace: s/int/long/ and s/Integer/Long/ and it feels that it's something that could be included in the standard xbase library. Put another way, I don't like the idea that everybody will end up with their own copy of it in one's project.

best regards,
Vlad
Re: xbase: LongExtensions [message #810836 is a reply to message #810801] Thu, 01 March 2012 15:55 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3118
Registered: July 2009
Senior Member
Hi Vlad,

extensions for all primitive types are available in the 2.3 stream of
Xtext and can be consumed as milestone / nightly build.

Regards,
Sebastian
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com

Am 01.03.12 16:19, schrieb Vlad Dumitrescu:
> Hi!
>
> I read previous posts about why the library provides extensions only for
> regular integers (it's easy to add then oneself, the language is not for
> number crunching), but I hope that I might at least make the case for
> the long integers.
>
> "long" is used here and there, most notably in
> System::currentTimeMillis(), and it's surprising that one can't do any
> math on them. The biggest problem is when one has commited to implement
> a class in Xtend and after a few hours of work one notices a glitch like
> this...
>
> LongExtensions would be a trivial search and replace: s/int/long/ and
> s/Integer/Long/ and it feels that it's something that could be included
> in the standard xbase library. Put another way, I don't like the idea
> that everybody will end up with their own copy of it in one's project.
>
> best regards,
> Vlad
>
Re: xbase: LongExtensions [message #810894 is a reply to message #810836] Thu, 01 March 2012 16:50 Go to previous message
Vlad Dumitrescu is currently offline Vlad DumitrescuFriend
Messages: 431
Registered: July 2009
Location: Gothenburg
Senior Member
Sweet!

Thanks,
Vlad
Previous Topic:[Xtend]
Next Topic:Case insensitive and warnings
Goto Forum:
  


Current Time: Fri Apr 26 10:05:47 GMT 2024

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

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

Back to the top