Earlier quoted context omitted.
What is best practice when it comes to Java GUIs? Would you recommend Java for building cross-platform desktop apps with near native UI performance? The IntelliJ IDE looks great but most Java desktop apps I've come across just look and feel weird. Not sure why there is such a big difference.
Have a look at SWT. It's the best way to do Java UIs IMO. I don't know why it isn't more popular. It uses the native UI kits internally, so it feels and is 100% native.
JDK 8 Release Notes
171–180 of 314 posts
Re: JDK 8 Release Notes
#172Does anyone know if all the security issues that have given bad reputation to java are fixed in java 8 ? Is it safe again to develop java applets ?
If you have an environment where you need a full client, and the developer is trusted, use Webstart: You have to actively accept something on Webstart. If you do not trust the developer, make the interface in a regular webpage.
Re: JDK 8 Release Notes
#173Earlier quoted context omitted.
> It has a very complicated type system, but doesn't even allow you to express things like function composition or generic sums at the language level. Yeah, sure, it doesn't have Haskell's . or algebraic datatypes, just like lots of other languages. I'm not sure what's complicated about the Java type system, but I suspect you're trying to say you don't like subtyping. Moving on... > Its syntax is stunningly verbose (…
Checked Exceptions and null. I write a lot of Java and I generally enjoy the language, but those two things; if Oracle could fix those somehow I would be extremely pleased. I'm so tired of writing null checks and I hope Optional is not the final answer since it too can be a null due to programmer error. I am really worried about Optional getting abused in Java 8... Actually, I waffle on checked exceptions; it seems e…
I'm so tired of writing null checks ...
Could the null checks of Java be compared to the ones used in C#? My C# code is often littered with ternary operators to deal with null values. And that's still not as safe as the Objective-C approach where one can just send messages to nil[0] which is really awesome imo.I guess I kinda wonder if I could avoid the null checks in C# somehow ... I figured using a design by contract approach might be used to reduce the null checks somewhat.
[0]: http://stackoverflow.com/questions/156395/sending-a-message-...
Re: JDK 8 Release Notes
#174Earlier quoted context omitted.
The problem is not java the lang. It's the java developers. Looks like they moved on to do angular now.
I partly agree with this. I'm a systems engineer, but I have to touch some Java code from time to time. I always have an hard time with the amount of indirection an average Java developer can reach. Luckily a few smart guys were hired recently and they have past experience in contributing to the JVM and their approach to the code is completely different and much, much more simple to understand, and since they came on…
It probably has to do with the "enterprise" culture that tends to err on the side of overgeneralising things and applying far too much abstraction (Java came into being at a time when the OOP fad was gaining significant traction.) The standard library also being in that style encourages this too.
But things like Java4K suggest that it's definitely possible to do a lot in a tiny amount of code.
Re: JDK 8 Release Notes
#175Re: JDK 8 Release Notes
#176Earlier quoted context omitted.
Is there any major language out there that actively removes old/bad parts of it's standard library?
Scala? It's still a very young language, though.
Re: JDK 8 Release Notes
#177Re: JDK 8 Release Notes
#178Earlier quoted context omitted.
Checked Exceptions and null. I write a lot of Java and I generally enjoy the language, but those two things; if Oracle could fix those somehow I would be extremely pleased. I'm so tired of writing null checks and I hope Optional is not the final answer since it too can be a null due to programmer error. I am really worried about Optional getting abused in Java 8... Actually, I waffle on checked exceptions; it seems e…
> Checked Exceptions and null. Let's not forget about type-erasure generics. And the existence of arrays. And the fact that people still use arrays.
Type-erasure generics are a fortuitous platform decision, because its what enables languages on the platform to have a good interop story while still having a more robust type system than Java does -- case in point, Scala, and why the .NET version died.
Re: JDK 8 Release Notes
#179You know, I've been messing around with Java little lately. Nothing too fancy. It's actually not a bad language -- with a modern IDE it's actually pretty quick and breezy to work with. If the standard library was cleaned up and the warts were all removed and filled in, even if it broke compatibility (call it Java X or the Latte language or something) I'd be okay with that. There's too much old 90's cruft hanging arou…
No, actually, Java is a really bad language. It has a very complicated type system, but doesn't even allow you to express things like function composition or generic sums at the language level. Its syntax is stunningly verbose (e.g., no map literals; only now adding lambda literals; no type synonyms; no operator overloading). There is no macro system or method_missing or any other way of really extending the language…
I can see both side of this. My favorite language to work in is Perl, which is loaded with all kinds of little context sensitive literals. But Java "the language" is pretty quick to pick up and get working with if you're already familiar with another Algol family language, and you can usually read other people's code without too much fuss because the language doesn't support all sorts of ways of writing something.
But on the other hand, you do end up with lots of lines to do something that should be relatively few lines if a more context specific syntax was supported. For example, the last time I worked with Java, code was littered with a half dozen lines of Iterator mess every time you wanted to go through some collection, the new for syntax is very very nice...but there's still little hard corners it's not that well supported in, like maps, because the underlying structure of the map means I have to build some temporary object to handle an item on the map in the loop...even though the map collection I'm using is in the standard library and should be part of the language via some syntactic sugar.
I'm still stunned that operator overloading isn't supported, I have a few use-cases already where that would be very helpful.
Re: JDK 8 Release Notes
#180Earlier quoted context omitted.
Few hundred milliseconds? I played with clojure a month or so ago and invoking lein repl was ~7.5 seconds.
Yes, I can confirm this. Clojure seems like a good fit for tiny projects that are little more than scripts, but the start up time makes them kind of annoying to manually test. Fortunately Clojure does have a REPL.
A JVM with smaller memory and cpu needs and faster startup would make me consider using Scala/Clojure again.