Slashdot Asks: What Are Your Favorite Java 8 Features? (infoworld.com) 427
New submitter liveedu shares with us a report from InfoWorld: When Java 8 was released two years ago, the community graciously accepted it, seeing it as a huge step toward making Java better. Its unique selling point is the attention paid to every aspect of the programming language, including JVM (Java Virtual Machine), the compiler, and other help-system improvements. Java is one of the most searched programming languages according to TIOBE index for July 2016, where Java ranks number one. Its popularity is also seen on LiveCoding, a social live coding platform for engineers around the world, where hundreds and thousands of Java projects are broadcasted live. InfoWorld highlights five Java 8 features for developers in their report: lambda expressions, JavaScript Nashorn, date/time APIs, Stream API and concurrent accumulators. But those features only scratch the surface. What makes Java 8 amazing in your opinion? What are your favorite Java 8 features that help you write high quality code? You can view the entire list of changes made to the programming language here.
Could you gush a little more? (Score:4, Funny)
Seriously? This is "journalism"? It's just a gushing promotion.
My favorite features are the brutally awful runtime performance and the incompatibility from one JVM/J2EE server to the next. Just awesome.
Runner up "feature" is the litigous vendor behind it all. I just *looooove* Oracle. They are such nice people!
Re:Could you gush a little more? (Score:5, Insightful)
Re: (Score:3, Informative)
Well, I'm both a programmer and a decision maker, and I really wonder about the motivation of someone who would pick Java for a new project. Oracle is beyond toxic.
I'm a certified Java Programmer (1.4) and really don't advertise it any more. Oracle's Java is dead to m
Re: (Score:3)
Who has the luxury to start a made to last new project from scratch except maybe some opensource zealots?
If no one has that luxury then shouting "rah rah Java!" from the rooftops also does no good since everyone in this hypothetical is already stuck with whatever language their project was written in.
But that world isn't real. Instead, some of use do start new projects and we do think about what tool to use.
And Java is the absolute last tool I will ever use... except Oracle's database: that comes below even Java.
Comment removed (Score:5, Interesting)
Re: (Score:2)
Heck, now that the C# compiler suite (Roslyn) is open source, Google could even fork it and do whatever it wanted with it. Not that I suggest it... that community is pretty awesome and the language has managed to remain incredibly clean and forward-thinking given its heavy evolution.
Re: (Score:2)
I don't know C#, other than it is a sort of almost C++, but not quite. Oh, and it runs in a kind of JVM, but not quite. Obviously I can't comment on the merits or otherwise of the language, but having long experience with both Microsoft and Oracle, I feel I come out in favour of Oracle - perhaps not on how nice they are (they are both businesses - ie callous, greedy and only trustworthy if it is profitable), but to an engineer what matters is not 'how gentle their smile, how sweet their countenance', but th
Re: (Score:3)
The documentation for C# (and to be honest all of Microsoft's recent offerings) is phenomenal. Easy to read, easy to search, well referenced, lots of examples. The language itself is modern, sleek, well thought out, and has incredibly useful features like LINQ that simply no one else has.
As a linux nerd I spent two decades laughing at M$'s incompetence. But I have to give credit where credit is due. I hate the fact that C# is my current favorite high-level general purpose language.
Re: (Score:3)
How can you possible think that? C++ is just class slapped on C. The fact that you need to define your private fields and methods publicly in the header file makes C++ just a cripple as an object oriented language. The rest is just good to obfuscate your code, i.e. op-overloading and templates.
I suppose it is a matter of taste what you consider good, and I have no problem accepting that other people don't have the same likings as I do, but I will try to explain. Firstly, I think your description of C++ is wrong; a huge amount of very careful considerations have gone into the design of C++ from the very beginning. Bjarne Stroustrup, for all that he's a Dane (like me), is actually a clever guy. Your reasons for not liking the result should not include the assumption that it is "just class slapped o
Host Unknown (Score:2)
My favorite Java 8 feature:
java.net.UnknownHostException: slashdot.org: unknown error
Because really, it's impossible to get a better message than "unknown error" from the getaddrinfo call it's making under the hood.
Hrm, I guess that's a bug not a feature.
This is insenstive (Score:2)
I'm using Dalvek
Re: (Score:2)
Re: (Score:2)
Java is now toxic thanks to its owner. For the sake of the entire tech industry, we all should consider it a legacy technology that should be removed from everything as quickly as possible. Unfortunately that will take years... maybe even decades, but we must start the deprecation process as quickly as possible. Besides, in the 20 years since it was created we have better cross platform languages now anyway.
Thankfully a lot of us have input in to technical decisions here. We all need to take a stand and kil
Re: (Score:3)
C# IS a better language by far. The reason Java made it that big was because people wanted an alternative to Microsoft so bad and Java was the Android of the time. Well that and the massive hype during the dot-com bubble era.
Re: (Score:3)
Every other tech that is somehow competing has server drawbacks. I don't see anyone doing enterprise software in Python, C++ or C#/.Net ...
If you don't see anyone doing enterprise software in C++ or C#, you haven't looked hard enough. There are thousands of companies doing exactly that. Heck, go check out any job search site.
One particular trap that you may be falling into is assuming that your local market is representative of other places. Some geographic regions can become locally locked in to some tech that dominates the market in that region - Java, Delphi, VB, you name it. These come and go, though, and of course, being local, they don't
System.exit() (Score:2, Insightful)
Promoted? (Score:5, Insightful)
Re: (Score:2)
After seeing how bad "Corporate Social Media Consultants" are on Reddit and nearly everywhere else I don't doubt it.
If it's anything like the Fortune 500 companies I've worked at it's a committee of 40+ year olds* that are also 10-15 years behind the wave of everything. "Hey I heard of this company called Slashdot. It's for techny people. I's really easy to make an account. Lets make something up, they'll never notice".
Based on how and when it was posted they're all at home right now patting themselves on t
New and exciting ways to run out of heap space (Score:2, Insightful)
No more permgen!
lambdas of course (Score:2)
The signiture feature is lamdbas for easier functional programming. Other goodies are nice but the lamdbas are the best new feature.
Did I say it first to get the 5?
Decimal Numbers? (Score:4, Interesting)
Have they added support for decimal numbers yet? .Net has had support for decimal numbers for quite a few years now (At least since 2003 [microsoft.com]). It comes in really handy for doing applications dealing with money, which quite a lot of applications deal with. Floats and doubles don't work well with currency values as they can't hold exact decimal values for many commonly encountered numbers. There are work arounds like using integers to store the number of cents, and using classes like BigDecimal, but both of those have quite a few drawbacks.
Re:Decimal Numbers? (Score:4, Informative)
Looks like you're looking for "JSR 354: Money and Currency API" Its an API, not language primitive. Its not surprising given that decimal numbers are essentially strings for all tense and purposes with some convenience math features wrapped around them. Outside of said library there are probably dozens of math libs that you could work with for your fixed size precision needs.
Re: (Score:3)
Re: Decimal Numbers? (Score:5, Funny)
Tents for porpoises?
Re: (Score:2)
Re: (Score:2)
How do this work when calculating tax rates? Taxes can be at a fraction of a percent. Quebec for instance has 9.975 % sales tax. If you store your amounts as integers in total cents, what value do you multiply by to get the tax? If you have a proper decimal data type, you can store store the exact values. .Net has no problem storing 9.975, 0.09975 or any number up to 28 significant digits without worrying about weird floating point anomalies.
Re: (Score:3)
Re: (Score:2)
A rate and an amount are quite distinct things.
For your example, you'd multiply by 9975 and then divide by 10000. Or maybe 100000. Fuck it, QA will catch it.
Yeah, I've seen old code dotted around with magic numbers like that.
Re: (Score:3)
The base unit is cents, not dollars, anyway. (In the US)
No, that would be mill, which is defined by congress as the "lowest money of account, of which 1000 shall be equal to the federal dollar".
Except for property taxes and gasoline prices, it's generally rounded to the nearest cent, though.
Re:Decimal Numbers? (Score:5, Informative)
BigDecimal is not a work-around. It is the exact solution to the problem.
Re:Decimal Numbers? (Score:5, Informative)
Re: (Score:2)
BigDecimal is not a work-around. It is the exact solution to the problem.
All mechanical representations of numbers lead to inaccuracies.
Computer scientists using binary-based representations realize this and design their algorithms to minimize the errors.
Accountants just define any inaccurate decimal-based results as "correct".
Re: (Score:2)
All mechanical representations of numbers lead to inaccuracies.
That statement is false. While decimal number types may have limited precision, they are, in fact, accurate.
Comment removed (Score:5, Informative)
Re: (Score:2, Interesting)
Re: (Score:3, Interesting)
Re:Major features are complementary (Score:5, Insightful)
Stop conflating your unfamiliarity with it being shit. It took me, a C++ guy, a day of getting used to it. If you can't wrap your head around that, you shouldn't be programming. It's easy stuff.
Re:Major features are complementary (Score:4, Insightful)
Yes, it looks like garbage, this is why some people are switching to java dialects (still fully compatible with all libraries and java APIs both directions, but considerably shorter). My favorite, xtend, would have
def getLastFour(Optional employee) { .flatMap(zipCode) .flatMap(lastFour) .orElseThrow[new FMLException("Missing data")];
employee.flatMap(primaryAddress)
}
or, without Optionals and exceptions, old school, embrace nulls
def getLastFour(Employee employee) {
employee?.primaryAddress?.zipCode?.lastFour
}
You can get similarly short code in groovy, scala, koitlin and whatever else. Java strength lies in ecosystem (frameworks, interoperability, portability etc), not because of language syntax.
Said that, there is a lot of overdesign and monstrosities in popular frameworks as well, but there you have a choice of using something more lightweight.
Re: Major features are complementary (Score:4, Insightful)
If you think that mess of streams is clearer than a for loop would be, you're on crack. It's incomprehensible.
Re: (Score:3)
Re: (Score:3)
No. No it isn't. THe method names would tell me just the same used inside a forloop. You have added no value, while making it harder to debug and harder to read. If you use streams you're a shitty programmer.
Re: (Score:2)
I'm still on Java 6 you insensitive clod (Score:2)
EOM...
Speed Improvements (Score:4, Funny)
Java is so [Garbage Collecting] much fas [Garbage Collecting]ter then C becu [Garbage Collecting]se of its [Garbage Collecting] GC algorithms.
If y [Garbage Collecting] o [Garbage Collecting] u want raw [Garbage Collecting] [Garbage Collecting] [Garbage Collecting] speed, you h [Garbage Collecting] ave to prog [Garbage Collecting]ram in Java, not C or [Garbage Collecting] [Garbage Collecting] [Garbage Collecting] [Garbage Collecting] [Garbage Collecting] ASSembler.
With only 16Gb of [Garbage Collecting] [Garbage Collecting] [Garbage Collecting] RAM, I can compile a simple h [Garbage Collecting] [Garbage Collecting] [Garbage Collecting] [Garbage Collecting] ello W [Garbage Collecting] [Garbage Collecting] [Garbage Collecting] orld program, and it only takes 15 [Garbage Collecting] [Garbage Collecting] [Garbage Collecting] [Garbage Collecting] [Garbage Collecting] to run!
Windows should be redone in [Garbage Collecting] [Garbage Collecting] [Garbage Collecting] [Garbage Collecting] [Garbage Collecting] ..out of memory, stack trace, garbage here:
Re: Speed Improvements (Score:3)
Haven't had mod points for years (no idea why) but if I did, you'd get them all. Thanks for making me truly laugh out loud.
Java’s problem is memory usage (Score:3)
That’s funny, although unless you’re bumping up against your VM memory limit, it’s not such a problem. When you DO approach your memory limit, performance drops to a crawl. In the 32-bit days, I hated the fact that my colleagues in AI developed in Java instead of C++ for programs that worked on really huge datasets just because of this issue. The programs would be frozen on GC for as much time as they did computation. That doesn’t mean I hate Java; I really like it, but this was
Best feature (Score:3)
... is how easy it is to remove.
It's NOT Microsoft... (Score:2)
Yea, that's about it for Java.... Well that and that cool "Memory leaks are a thing of the past" idea can be nice... Yea, I know, Java still leaks memory from time to time... But they at least tried to rid us of all that malloc and free complications..
Date Time API (Score:2)
.... is a bit shit. It's better than the old one but not as easy to used as the Joda Time library it was based off of.
Marketing (Score:4, Interesting)
The best thing Java ever had is good marketing, that's it.
security fixes! (Score:3, Informative)
Best Language Ever (Score:3, Funny)
They've finally done it! Java is now indisputably the best programming language available! They finally fixed all of the bugs! It's the most secure language available! Best of all, Oracle opened source the whole JVM under a copy-left license! Java 8 is indeed a game changer! These are exciting times indeed!
Subpoena generator (Score:2)
I love the fact when a non sanctioned language generates a lawsuit on demand when interacting with the APIs
According to HR (Score:2)
The best thing about Java 8 is that you only need 73 years' experience with it to land a great job.
My favorite feature? (Score:2)
Re: (Score:2)
That's a good thing, because client side Java from the browser is basically dead. Google Chrome doesn't even support the Java plugin anymore, and neither does Microsoft Edge. Firefox and Internet Explorer still support it, but disable the plugin as a security risk if you're not updating it to the latest release on a monthly basis.
They've basically made supporting the operation of Java applets in a browser impossible to support, which is great unless you're still stuck supporting them.
Lambda's plug poor OOP language design (Score:2)
With better OOP Java wouldn't need stinkin' lambdas. Lambda's just give spaghetti coders more ways to write cryptic "cutesy" code. Flexible methods can usually do that same thing.
For example, if Java blurred the distinction between instances and classes, then one could attach an OnClick() method directly to a UI button object instead of pushing it to a listener doodad, which is silly and unnatural.
If the guts of a button object want to register the button's method(s) in a listener object via instantiantion
Re: (Score:2)
In Obj-C, Code Blocks are an awesome way to un-spaghetti-fy source code by doing away with protocols.
Translate that to Java:
In Java, Lambdas are an awesome way to un-spaghetti-fy source code by doing away with interfaces.
In Obj-C, we've been able to clean up and streamline our code a lot using completion blocks. But as with any technique, you can be an idiot using it. It's all about proper usage. Knowing when to eat your spag and when to eat the meat balls.
Disclaimer: I work for Oracle, using native iOS too
Re: (Score:2)
With better OOP Java wouldn't need stinkin' lambdas. Lambda's just give spaghetti coders more ways to write cryptic "cutesy" code. Flexible methods can usually do that same thing.
I actually like lambdas but I think they are highly overrated. They have become trendy and furthermore it has become trending to claim you could write an awesome programs if only you had lambdas. In most cases what they mean by this is simply "if the language supports functions as first class objects" and all that lambda provide beyond that are anonymous functions.
Unique? Nope (Score:2)
Clearly (Score:3)
Ugh. (Score:2)
"...the community graciously accepted it, seeing it as a huge step toward making Java better. Its unique selling point is the attention paid to every aspect of the programming language..."
Java 8 also turns your garbage into gold, serves you pancakes in the morning, and will never give you up. This is ad copy.
You forgot best feature of all! (Score:2)
That I don't have to install it, use it or ever have to deal with it again. That is by far it's best feature.
The best feature is that I don't have to run it (Score:2)
It has sucked so much lately, with so many security issues, that anything that requires Java has been replaced with something more modern. Just say no to Java!
Least favorite Java feature (Score:3)
That it is still controlled by Oracle.
The Ask Toolbar! (Score:2)
My favorite Java 8 feature is that wonderful Ask Toolbar! You like type words into it and it finds stuff that actually has those words! It's like a personal librarian ... well, with ads glued to her ass.
I don't use Java (Score:2)
Streams (Score:2)
Streams were the best surprise when I had to work with Java a couple of months ago after years of other languages. They are good but it's still the worst language with that kind of functionality. I could write in 5 lines what would have taken me a page of code, but it's still a one liner in Ruby or Python. Too much boilerplate, as usual for Java. The problem is that it can't be helped given the nature of the language. Faulty original design.
The feature that really increased productivity (Score:2)
Java8 has a much more streamlined uninstall routine.
Some good, some bad (Score:4, Interesting)
Lambda expressions: A total brainfart. Lambda notation has no place in an imperative language; mixing paradigms is confusing for the vast majority of Java programmers. Most people just use lambdas as "magic syntax" to simplify things like declaring event handlers. The ugly syntax is a problem, but lambdas are the wrong solution.
Date/time APIs: Yes, finally!
JavaFX: Oddly, the best feature of Java 8 isn't even mentioned in TFA. JavaFX is immensely better than Swing, in every possible way: it looks better, it works more reliably, and it's easier to program.
And the worst feature of Java 8 is the unnecessary complexity throughout the new features. Two examples:
- The Optional class. Instead of checking directly for a null result, you have to unpack every result out of this idiotic wrapper.
- Factory methods instead of constructors. Java is supposed to be an object-oriented language. In OO, you create an instance of a class with a constructor, which has the name of the class. But not in Java 8, no, instead you use a whole stable of factory methods with all sorts of weird names. Look at the new date/time classes for an example.
Re:Java? (Score:5, Informative)
Agreed. Not the best choice for anything.
Bullocks.. There are places for using Java.. Lots of them actually...
Now, I'm not going to blow the fan boy smoke and say Java is great for everything, it's not. I've seen applications in Java that where wholly inappropriate for the language, but because that's what the development team knew, that's what we got, with horrible results, performance and foot print problems that would make your head spin. (It made mine spin, trying to keep up with the ever expanding hardware requirements to keep that garbage running.)
So what's Java good for? User interfaces (GUI, WEB you name it) it's great. Need it OS independent? Use Java. It's OK for data processing, but you will need lots of compute resources compared to the same thing in C++. Don't like the "hard work" involved in memory management, Use Java and restart often. However, if you have strict response time budgets, or cannot afford to cycle processes to keep running, and lots of extra hardware use something else... PLEASE use something else because I know I won't field those kinds of applications in Java for you, I've had enough pain in my life already and I'm going to quit your project if you try to make me do it again...
Re:Java? (Score:5, Insightful)
Tools are tools. People need to quit arguing over how a tool was made and just use them.
I use Jenkins daily, it's written in Java. It's great. I have no desire to ever learn Java but it doesn't mean I can't use Jenkins. I have tools written in JavaScript, C, C++, Matlab, Simulink, Python, Perl, PHP, et al. As long as I have a way of getting it fixed if it's broken I don't care.
Additionally there's good money to be made in supporting tools that everyone still uses. COBOL, Fortran, Assembly all still have a massive amount of technical debt that may never go away.
Re: (Score:2)
Use Java and restart often.
You're kidding, right? Restart often? Like, the whole machine, or just the JVM? What class of problem admits restarting often as part of a viable solution?
Re: (Score:2)
For a great many years, anything that involved Windows.
The Microsoft support handbook:
-small problem -> reboot
-medium problem -> reinstall
-big problem -> upgrade
This solves 85% of the problems. For the remaining 15%, blame the antivirus and/or the user.
Re: (Score:2, Troll)
Many places use Cobol, and even more use Windows, too. That people use either doesn't mean Java is the right tool for the job. Any job (maintaining existing code notwithstanding).
Need it OS independent? Use Java.
Contrary to what Oracle's marketing dept says, in the real world even C is more portable.
User interfaces (GUI, WEB you name it) it's great.
I have no experience with Java on a web server, but after trying to use a few GUI programs in Java, sorry, no. It's a major pain in the ass to deploy: every single program needs a specific version of Java with specific configuration oddities
Re: (Score:2)
Contrary to what Oracle's marketing dept says, in the real world even C is more portable.
C runs on many platforms and environments. But Java tends to only run on one environment: the JVM.
Some clever folks know how to port the JVM to run on top of lots of platforms, but JVMs are usually written in C or C++. The Java apps themselves are still targeting a single universal environment.
Re: (Score:3)
I don't think it's Oracle astroturfing. That would involve an entire paragraph dedicated to how Google is an evil IP pirate that must be destroyed at all costs.
Re:Java? (Score:4, Funny)
My favorite Java 8 Feature: the uninstall feature.
Re:So what would you use? (Score:5, Insightful)
Unless you like staying up all night tracking down errors in pointer arithmetic.
Lumping C and C++ together generally means you haven't looked at how dramatically the C++ language has changed recently, especially if you talk about pointer arithmetic. If you're using modern C++ and are still worrying about pointer arithmetic (i.e. you're not abstracting it away), you're probably doing it wrong.
The nice thing about C++ is that, quite often, those abstractions either cost nothing at all, or at worst, far less than interpreted languages. Also, having used modern C++ for a few years now, I think garbage collection is vastly overrated compared to reference counted pointers and simple RAII. C++ is still harder to use than Java or C# in many subtle ways, but basic memory management is no longer one of those persistent thorns.
Efficient compilation? Yeah, sadly, that's not C++, and likely never will be. There are some newer alternatives that have these features and compile quite efficiency, since they don't come with the baggage of backwards compatibility, but I'm not sure how much traction they're going to gain in practical measurements outside of some niche locations. Their biggest downside? Yeah, they're not backwards compatible with billions of lines of C or C++ code out in the wild.
Re: (Score:2)
Garbage collection isn't RAII. It's OK for RAM allocations but useless for everything else. In Java you still have to remember to "free" all your non-RAM resources manually. Every time.
It's true of a lot of things in Java - retype all that boilerplate code over and over and over again.
Given the choice? I'll take reference counting thanks. It's not really much of a problem in practice and it works consistently for _every_ type of resource.
.
Re:So what would you use? (Score:5, Interesting)
There is a need for a light weight, garbage collected language with static typing an efficient compilation, but it does not exist. So Java it is.
Exactly. However, Java is pretty damn lightweight and efficient nowadays -- a heck of a lot less heavy than many alternatives. Partly that's because hardware improved, but mostly it's because several Java implementations have improved tremendously over the circa two decades and counting of Java's history. So, for example, Java is a mandatory part of the Blu-ray standards on ~$50 video players. And Google's Android Runtime (ART), another implementation of Java technology, is the world's most popular smartphone platform. On the server side there are extremely fast starting, lightweight, lower memory runtimes such as IBM's WebSphere Liberty Profile. The traditional efficiency rap against Java doesn't apply any more. "Back in the day" people complained about COBOL because it was "too slow" compared to that (allegedly) hand tuned Assembler code they weren't actually writing. Well, for several years, they had a point. By about the 1970s they didn't. Hardware improved, and the compilers got a lot better -- and that process continues, also for COBOL. Java used to be slow, sure...but what's that in your hand and on your wrist now? (And color TV used to suck, and car tires used to blow out at the first pothole....)
Another huge point in Java's (and for that matter COBOL's) favor is that it's a durable programming language. The invested value in Java code, and the ability to draw from that code portfolio to solve problems, is utterly massive. It's so massive that the Java programming language has crossed over into IT immortality along with only a very few other programming languages (FORTRAN, C, C++, and probably PL/I). Also, Java is the most demonstrably portable programming language (and compilation/runtime path) we have. (Any other nominees?) It's not at all hard to write functionally portable Java code that'll run, unmodified, on platforms ranging from Android smartwatches to z/OS mainframes. That's the default, and it really does work. High quality, performance-optimized and/or battery-optimized code is always a separate question. Any programmer can write lousy code in efficiency terms, and most do at least for Version 1.
Re:So what would you use? (Score:4, Interesting)
Repeating something often enough doesn't make it true.
Rather the point! The fact is that the Java programming language and runtimes, today, utterly dominate Blu-ray disc players, Android smartwatches, and Android smartphones, to pick some examples. (And what examples they are!) They're powerful evidence that Java hardware and software efficiencies have improved tremendously over two decades. Java is a raging market success, including on devices that cannot afford much inefficiency. It's reasonable and rational to mark-to-market dated views of Java's hardware and software performance attributes. The successful, high efficiency use cases are staring us in the face, literally.
Of course it is still quite possible (a) to write lousy code that the toolchain and runtime, for any language, cannot performance-fix sufficiently for your intended use cases; (b) to have certain scenarios where Java and its toolchain/runtime (for a particular implementation at a particular moment in time) do not produce the very highest efficiency/performance result technically achievable. Point (a) is always true (although a richer and deeper toolchain, and associated skills, can help a lot), and point (b) simply means that you toss efficiency/performance into your calculus with the relative importance it merits for your particular needs. There are other programming languages (and associated runtimes) available, including five durable ones: COBOL, FORTRAN, C, C++, and PL/I. Plus myriad not-yet-durable (and most never will be) options. (Pascal, Ada, ALGOL.... IT history is littered with them.)
Re: (Score:2)
Unless you like staying up all night tracking down errors in pointer arithmetic.
If you're doing pointer arithmetic in C++ then you might actually be writing C.
(Which was obvious from the moment you used "C/C++" in a sentence ... C++ is about as similar to C as Java is)
Re: (Score:2)
+1 Informative.
If Java was originally designed for UIs then how come every single Java program in the world has a crappy, slow, inconsistent UI?
Where are the major Java desktop apps? Or even the minor ones?
Re: (Score:3)
Why do you say 'Jave' when you mean 'incompetent Programmer' is beyond me.
The things you mention are not Java problems or problems of the Java library.
A window 'programmed' in Java just goes full-screen and back to its original sizes, just like any other window ... no idea what you are talking about.
Re: (Score:3)
I disagree. It's by far the best platform for those researching JIT compilation or designing advanced garbage collectors.
Like you'd want to do research with Python or something?
Re: (Score:3)
Re: (Score:2, Offtopic)
Re: (Score:2)
Re: (Score:2)
Java already had the capability. The javax.script package is from 1.6
Nashorn is just a newer, faster Rhino.
Re: (Score:2)
JavaScript seems like an extraordinarily bad choice for a customer-scripting language. I like JavaScript, but it has way too many dark corners to push it as a language for people with limited coding experience. This is what a language like BASIC was built for.
Re: (Score:2)
It's a bit like asking "What are your favorite cholera features", isn't it?
I guess the best Java 8 feature is that it enables more H1B visas?
Re: (Score:2)
Re: (Score:2)
Here's the thing the very important thing you might not realize:
Fair use of a copyrighted work is *NOT* breaking the law.
char buffers are more intuitive than strings, not (Score:2)
bitwise access to char buffers
What exactly would you like to achieve with this? A stream reader that converts ASCII to EBCDIC on the fly? A XMLReader that takes an EDI payload as a parameter?
Please give some details. Unless you're trying to show off like a Radio Shack employee complaining that iPads have no serial ports.
Re: (Score:2)
"Sort of." Java 8 added unsigned integer arithmetic methods to Integer. Examples: compareUnsigned, divideUnsigned, parseUnsignedInt, remainderUnsigned, toUnsignedLong, etc. You still use long and int, and they still have the capability to store signed values. However, if you want, you only use them for unsigned values and with the Unsigned methods.
I don't think it's a "glaring omission." Life is quite difficult without signed integers -- you've really got to have those. Signed integers (of sufficient width
Re: Row row row your boat (Score:5, Insightful)
Exactly the opposite. Streams took easy to read and understand for loops used by every language on earth and replaced it with gibberish that you need to work through to understand, and is far more difficult top debug as there's no damn place to put a break point or print statement. They're banned everywhere I've heard of
Re: (Score:3)
https://docs.oracle.com/javase... [oracle.com]
Re: Row row row your boat (Score:4, Insightful)
No,you're going to rewrite it to a for loop because its more maintainable, more easy to change with changing requirements, and more understandable.
Re: (Score:2)
If Java is so great... why Mozilla and almost any sane browser ask us to not run anything based on it and block the plug-in?
Because the browser plug-in security model was/is fundamentally broken. Browser vendors are discontinuing that plug-in model for every plug-in. If you want to continue running PC client side Java applications then you'll be moving to something called Java Web Start. JWS is a different, more secure way to launch those applications. Meanwhile, the Web sites you visit are often running lots of Java code to generate the content your Web browser displays. And if you're browsing the Web from an Android device (fa