tag:blogger.com,1999:blog-4133036378510199203.post1969813193088176438..comments2023-11-03T08:59:47.410-07:00Comments on Dot Neverland: Java 8.0 Wishlistjulian_zahttp://www.blogger.com/profile/08278483453087084978noreply@blogger.comBlogger6125tag:blogger.com,1999:blog-4133036378510199203.post-89510480008593740152012-07-14T11:26:45.449-07:002012-07-14T11:26:45.449-07:00> Parameter names in method calls. Nice to have...> Parameter names in method calls. Nice to have, but it would make DSLs in java nicer.<br /><br />I do not know what is your DSL but named arguments are optional argument enablers. Optional arguments will make API even more nicer. <br />http://valjok.blogspot.com/2009/01/programming-language-constructor-design.html<br /><br />The last wish is to use .class attribute applicable to class members. For instance "".equals.class would return a Method. This would eliminate the fragile wordiness of Class.getField(String name) and make pass-by-ref feasible! To pass-by-ref you just need two params: the Filed and object.valjokhttps://www.blogger.com/profile/05913343468893339183noreply@blogger.comtag:blogger.com,1999:blog-4133036378510199203.post-83367465971848432432011-07-21T12:05:43.954-07:002011-07-21T12:05:43.954-07:00I've been working on .NET for a couple of year...I've been working on .NET for a couple of years now and I have liked a lot of what's been given so far. Apologies if I mention things that are already fixed, haven't touched Java in ages.<br />A few things I really would like to see in Java though is maybe the following:<br />- Properties<br />- Delegates or at least lambdas<br />- I don't really care about named parameters but the property initialization like with dot Net would be cool<br />- Proper Generics. In the early Java 6 versions (don't know if its still like this) if you have a method that returns a value of type T[], you may allocate it to a variable once, after that you will get compiler errors if you try to assign it again.<br /><br />Some other things I would like in any static-typed language:<br />- Emitters. C++ has the #VARNAME thing in its defines. I would really like to be able to do the same in Java/C# over a string. This is useful to add some compiler type checking over the symbols emitted. For instance if I were to use reflection I would have to specify a string. Now imagine if I could do something like this: myReflectiveMethod.Invoke( "#(MyProperty)", my_paremeters); Now you have symbol checking, etc. and if you have resharper (Visual Studio) it will rename that as well. There are lots of applications for something like that.<br /><br />Apologies for long comment.Dandréhttps://www.blogger.com/profile/04574047868840250564noreply@blogger.comtag:blogger.com,1999:blog-4133036378510199203.post-20214419785058946562011-07-14T07:35:44.527-07:002011-07-14T07:35:44.527-07:00“Could you explain a bit more what you mean by ‘Pa...“Could you explain a bit more what you mean by ‘Parameter names in method calls’?”<br /><br />i guess he’s talking about keyword arguments like in python, scala, …<br /><br />afaik that would almost imply default values, because simple reordering of former positional arguments isn’t very useful by itself.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-4133036378510199203.post-8127944473351720932011-06-14T13:49:42.549-07:002011-06-14T13:49:42.549-07:00To me, properties is my biggest wish. I write a l...To me, properties is my biggest wish. I write a lot of ActionScript 3 (via Flex) and the implementation there is great. I'd love for Java to copy that implementation, which would look like this:<br /><br />public String get myProperty(){};<br />public void set myProperty(){};<br /><br />Could you explain a bit more what you mean by "Parameter names in method calls"? I assume you are referring to having access to them via reflection? Most of the time, if you have the source code your IDE takes care of this automatically, but I imagine it would be nice for the times you don't have the source code for a library.Anonymoushttps://www.blogger.com/profile/13717351728148640637noreply@blogger.comtag:blogger.com,1999:blog-4133036378510199203.post-32157152287578244842011-04-28T04:02:30.512-07:002011-04-28T04:02:30.512-07:00Operator overloading is very important for graphic...Operator overloading is very important for graphics. Working with vectors and matrices without operator overloading is not nice :(Paulo Falcaohttps://www.blogger.com/profile/12725068339629380494noreply@blogger.comtag:blogger.com,1999:blog-4133036378510199203.post-79681964278109499962011-04-28T04:01:49.713-07:002011-04-28T04:01:49.713-07:00Operator overloading is very important for graphic...Operator overloading is very important for graphics. Working with vectors and matrices without operator overloading is not nice :(Paulo Falcaohttps://www.blogger.com/profile/12725068339629380494noreply@blogger.com