tag:blogger.com,1999:blog-34692233.post2924937174917338516..comments2023-05-09T12:02:11.783+01:00Comments on Mind the Gap: Decimal syntaxGlynhttp://www.blogger.com/profile/08741529390385812080noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-34692233.post-64594595090779443422008-05-16T11:54:00.000+01:002008-05-16T11:54:00.000+01:00Interesting approach. Thanks Wilfred.Interesting approach. Thanks Wilfred.Glynhttps://www.blogger.com/profile/08741529390385812080noreply@blogger.comtag:blogger.com,1999:blog-34692233.post-4773025403743361192008-05-15T16:08:00.000+01:002008-05-15T16:08:00.000+01:00A couple of years ago, I created a small framework...A couple of years ago, I created a small framework that allowed you to express BigDecimal expressions in a more natural way. The framework took care of turning the expression in the regular BigDecimal arithmetic. One of the implementations generated byte code from the expressions. <BR/><BR/>I think with today's language features, there might be a way to make this even easier. I'll blog a bit about that in the near future. Meanwhile, the original entries are here: <BR/><BR/>http://blogs.sun.com/wilfred/date/20050721<BR/>http://blogs.sun.com/wilfred/date/20050722<BR/>http://bignumbers.sourceforge.net/Wilfred Springerhttps://www.blogger.com/profile/14440249224690404418noreply@blogger.comtag:blogger.com,1999:blog-34692233.post-16081899542934640802007-09-11T06:44:00.000+01:002007-09-11T06:44:00.000+01:00These are great questions, but the limited overloa...These are great questions, but the limited overloading approach was suggested by Sun and I'm not sure precisely what form it would take and how broadly applicable it would be.<BR/><BR/>At the moment, I'm trying to make the case for a JSR, either by persuading Sun to lead it because of demand, e.g. from the financial sector, or by having IBM lead it, which involves finding the necessary funding internally.<BR/><BR/>The JSR Expert Group would address the above kinds of questions.Glynhttps://www.blogger.com/profile/08741529390385812080noreply@blogger.comtag:blogger.com,1999:blog-34692233.post-40645603310125557452007-09-10T23:33:00.000+01:002007-09-10T23:33:00.000+01:00I think it's a wonderful idea. BigDecimal are very...I think it's a wonderful idea. BigDecimal are very common, especially so in business logic code. As it stands now, handling the most basic calculations on decimals involves technical details that obfuscates the code.<BR/><BR/>I'd love it if this business logic could be expressed in a clearer way (and more succinct as a side effect).<BR/><BR/>Could you please explain the difference between limited operator overloading and decimal-specific support? What is "limited" in this context? having to declare the classes that are allowed to participate?<BR/><BR/>For what other types would it make sense to apply operator overloading (Date/Collection)? What about applicative types wrapping numeric values (like Money for BigDecimal or Age for int)?Anonymousnoreply@blogger.com