If Java Is Dying, It Sure Looks Awfully Healthy
Hugh Pickens DOT Com writes "Andrew Binstock writes at Dr. Dobb's that a recurring prejudice in the forums where the cool kids hang out is against Java, often described as verbose and fading in popularity but Binstock sees little supporting evidence of Java being in some kind of long-term decline. While it is true that Java certainly can be verbose, several scripting languages have sprung up which are purpose-designed to spare developers from long syntactical passages to communicate a simple action, including NetRexx, Groovy, and Scala. As far as Java's popularity goes, normally, when technologies start their ultimate decline, tradeshows are the first to reflect the disintegrating community. But the recent JavaOne show was clearly larger and better attended than it has been in either of the last two years and vendors on the exhibiting floor were unanimous in saying that traffic, leads, and inquiries were up significantly over last year. Technically, the language continues to advance says Binstock. Java 8, expected in March, will add closures (that is, lambda expressions) that will reduce code, diminish the need for anonymous inner classes, and facilitate functional-like coding. Greater modularity which will be complete in Java 9 (due in 2016) will help efficient management of artifacts, as will several enhancements that simplify syntax in that release. 'When you add in the Android ecosystem, whose native development language is Java, it becomes very difficult to see how a language so widely used in so many areas — server, Web, desktop, mobile devices — is in some kind of decline,' concludes Binstock. 'What I'm seeing is a language that is under constant refinement and development, with a large and very active community, which enjoys a platform that is widely used for new languages. None of this looks to me like a language in decline.'"
Wake me up when netcraft confirms it. Until then it's not dying.
I'm a good cook. I'm a fantastic eater. - Steven Brust
Is Java a scripting language? I think anyone that thinks Scala is a scripting language, whatever that is, doesn't know what they are talking about.
Java had closures in the form of Anonymous classes. While it is true that lamda expressions will be much more concise, it is not correct to suggest that closures are being added with Java 8.
I often hear that Java "doesn't have closures." Since anonymous methods can capture variables within the scope of their declaration, they are closures.
I also frequently hear that Java is "interpreted," but that's a whole 'nother discussion.
Funny, I thought Scala was a fully compiled, statically type-checked language (at least as much as Java is). A language is not a scripting language just because it doesn't suck.
I wish it would get the fuck on with it. Type erasure.
It has an unsigned 16 bits integer. It is called "char"
MOD THE CHILD UP!
I use it on mission critical applications at work and it does a very efficient job of testing all the functionality of Nagios to page me at 3:00 AM. I have other java applications that are designed to explore the limits of slab allocation and heap return in memory. Theres even a java application I wrote that calculates financial reports. I know what you're thinking, and yes, it performs well as it stress-tests VoIP bandwidth and the helpdesk ticket system.
there are still so many uses for java. one of my earliest and oldest projects I still use to this day! its an application to help post Slashdot comme!####)))!%[NO CARRIER]
Good people go to bed earlier.
The Dead Collector: Bring out yer dead.
[a company puts COBOL on the cart]
Oracle Corporation with Dead Body: Here's one.
The Dead Collector: That'll be ninepence.
Java: I'm not dead.
The Dead Collector: What?
Oracle: Nothing. There's your ninepence.
Java: I'm not dead.
The Dead Collector: 'Ere, he says he's not dead.
Oracle: Yes he is.
Java: I'm not.
The Dead Collector: He isn't.
Oracle: Well, he will be soon, he's very ill.
Java: I'm getting better.
Oracle: No you're not, you'll be stone dead in a moment.
The Dead Collector: Well, I can't take him like that. It's against regulations.
Java: I don't want to go on the cart.
Oracle: Oh, don't be such a baby.
The Dead Collector: I can't take him.
Java: I feel fine.
Oracle: Oh, do me a favor.
The Dead Collector: I can't.
Oracle: Well, can you hang around for a couple of minutes? He won't be long.
The Dead Collector: I promised I'd be at Microsoft. They've lost nine today.
Oracle: Well, when's your next round?
The Dead Collector: Thursday.
Java: I think I'll go for a walk.
Oracle: You're not fooling anyone, you know. Isn't there anything you could do?
Java: I feel happy. I feel happy.
[The Dead Collector glances up and down the street furtively, then silences the Body with his a whack of his club]
Oracle: Ah, thank you very much.
The Dead Collector: Not at all. See you on Thursday.
Oracle: Right.
Welcome to the Panopticon. Used to be a prison, now it's your home.
Yes, we can all dream of a day when Oracle is just ashes on the ground, and a footnote in corporate history.
The reason Java is still alive and well is not because it's a good language. It's not because Oracle does a good job patching security faults with it. It's not because it may be able to run most of it's code on any given OS that can run its VM.
The reason Java is still alive and well is because it is the OO language most schools, universities and colleges teach in their CS classes.
The great part about Java is that there are so many libraries for it.
http://docs.guava-libraries.googlecode.com/git/javadoc/com/google/common/primitives/UnsignedInteger.html
I'm surprised no mention of PowerShell was listed. It's obviously platform specific, but Microsoft has done a nice job of including it in all their major platforms and products in recent years. I've used it on site for several customers, and I've had customers who are more technical asking about help with it. I'd be interested to see what sort of growth it's seen, and how it is supplanting (one can hope) old vbscript files that still linger.
I will shred my adversaries. Pull their eyes out just enough to turn them towards their mewing, mutilated faces. Illyria
It would have been better if Android supported Python instead of Java.
Support my political activism on Patreon.
Python, Perl, and Ruby are examples of other languages that don't support unsigned integers. These languages are independent of the underlying hardware and automatically upsize the integer to handle larger value. You can always use the AND operator to convert to an unsigned integer for C calls. (e.g. var & 0x0FFFFFFFF).
You're not a real programmer if you can't adapt to the lack of unsigned variables.
Outside of Android - I believe use and acceptance is waning heavily. As a client-side web tool (where it got most of it's early predominance) it has been cockblocked by iOS, and is becoming overshadowed by native HTML5 (JavaScript) stuff. As a server-side tool it has been getting taken over by Ruby/Rails, Python and the stuff mentioned in the OP.
People don't understand the difference between Java the Language, Java the Virtual Machine (JVM) and Java the Browser Plug-in.
What do NetRexx, Groovy, and Scala have in common? They are all languages that are considered production stable running on top of the JVM. There are about a half dozen production ready languages that run on top of the JVM in fact. By running in the JVM these languages automatically pick up all sorts of performance and availability enhancements (JIT, Hotspoting, caching, etc.) the JVM offers. That's a lot of R&D the new languages don't have to invest in. It also allows new languages to be used in existing Java infrastructure with little to no change.
The reason this is all possible is because Java the language is just an abstraction that compiles to Java Op Code. Java Op Code is very stable. Since Java 1.0 all that's changed with the opcode is a couple new operations and couple deprecations. There's still around 100 codes total.
So why do people think Java is on the decline? Well the browser plug-in has been getting a bad name as of late. But that plug-in != Java. And frankly very few applications need a Java Plug-in. HTML5 and JS work just fine for the UI. It's not going to be a great loss if peopledisable it. You also get knee jerk reporting on this advising people to get all Java on their machines. Like it's somehow less secure than the VB runtime executors.
As far as jobs, I work in the java space. There's way more need than people to fill the need. I make extremely good money java programmer.
The JVM or the language?
I'm god, but it's a bit of a drag really...
A lot of very large users of Java are unhappy with it, not necessarily for technical reasons, but for legal reasons since Oracle set such a negative tone in court.
The only reason Java isn't dead yet is that it would be expensive to abandon existing infrastructure so abruptly. It will be a around for quite a while still, but it won't be too long before it's relegated to the decaying margins of the software industry.
https://ep2013.europython.eu/conference/talks/developing-android-apps-completely-in-python
I'm god, but it's a bit of a drag really...
It's all a matter of perspective, anything alive and well can only get sick and die eventually. Death is an eventuality. So really, Java is dying.
A 'singular oddity' is an event that cannot be explained and only happens when you are alone.
You should tell John Carmack about your theory, I bet he'd be really interested:
https://twitter.com/ID_AA_Carmack/status/85734195644727297
Mod me down, my New Earth Global Warmingist friends!
CUSTOMER: Here's one -- nine pence.
DEAD PERSON: I'm not dead!
MORTICIAN: What?
CUSTOMER: Nothing -- here's your nine pence.
DEAD PERSON: I'm not dead!
MORTICIAN: Here -- he says he's not dead!
http://www.sacred-texts.com/neu/mphg/mphg.htm#Scene 2
Oracle is doing some really bizarre things with Java 1.8, and one of the major growth areas of Java is on Android, an environment suited only for insane developers. But the core language is doing fine.
kivy.org
Java will not be dead with solid evidence.
They reason that Java is dyng because their iPhones and iPads don't support it.
As if features are the only thing that makes a language a language. I'm not saying Lisp isn't nice, but which lisp? And, after you select which lisp, which library to do the thing you're trying to do? Oh wait, they often don't exist. So you hand roll your own, because it is easy in lisp, due to lisp's powerful nature. So now you can't hire people who know about the things you're doing right out of the gate because you choose a specific lisp and hand rolled a bunch of stuff. Need to integrate with xyz technology? There's probably not a lisp library for it that is standard, if it exists at all. Its also rarely mature...
In the end, some version of lisp might still be a really good choice for some project. However, it has significant disadvantages to overcome. Adding lisp like elements to a language like Java is a much nicer thing than your quip seems to appreciate because it gives you some of the advantages of using lisp while retaining all the advantages that java will provide. Maybe lisp should try to invent java by standardizing the language and writing a lot of mature libraries?
It definitely doesn't help that the JRE installer tries to also install the Ask toolbar. Seriously? Even Microsoft doesn't try to install Bing with the .NET installers, and that's their own property they're desperately trying to push on everyone.
How am I supposed to take a platform seriously if the fundamental piece that has to be installed by all developers AND users to use it is doing the same sneaky things that half the crappy freeware on the internet is doing?
Just how much revenue does Oracle make from Ask anyway?
Speak before you think
Great idea! Let's implement everything on our phone in an incredibly slow, dynamically typed language, whose only relevant implementation has a GIL and a pathetically bad concurrency model! That will be great for performance and battery life!
Google is dropping Python for a reason.
Over datasets are in the terabytes. Calculations distribute over thousands of nodes and cores. Only in the 1990s was thre concern about efficiency. 64-bit JVMs have been a godsend. Formerly a FORTRAN-90/C++ shop.
Java allows seamless GUI front ends and web-service control.
The new features in Java-8 are very interesting.
... in the forums where the cool kids hang out is against Java...
Yeah..and how many of these "developers" are still going to be writing code in 5 years?
It would have been better if Android supported Python instead of Java.
To develop stable applications quickly, you want MORE compile-time checking, not less. Like if Java could mark variables as nullable or not and compile-time check that (there are some extensions for that, but they don't always keep up). Java/JVM does so much right ... If people can't see that, then I suggest they attempt some reasonably large project in several languages and compare. (I have done exactly that, in C, Vala and Java; Rust will be next when I get some time.)
Java's problem isn't verbosity IMHO. It's the general mindset and community that has grown around the language. Instead of simplicity, they've gone into massive over-engineering, with factory factory factories and the like. A combination of pattern mania, and "enterprise" java, has resulted in turning an otherwise simple language into a veritable nightmare. Contrast this with the python community for example. Language wise, compare Java with C#. C# has done things a lot better in general. It may help that newer versions of Java will achieve some degree of feature parity with it but in the long run, I think it also has to be accompanied by a shift in the general notion of what's "normal" design in the Java world.
You're not a real programmer if you can't adapt to the lack of unsigned variables.
Forget about being a "real programmer" and focus on being a "real developer.' There are functional requirements and then there are technical requirements. Functionally speaking, how important is it to have an unsigned data type rather than having the equivalent data type and enforcing a "no negative values" rule? I'm not sure I can think of any, aside from the case of being able to interpret unsigned data types for interoperability. But that says nothing about the need for the actual storage of that data.
I'm pretty sure that some respected Computer Scientist said something about premature optimization....... It's a good rule. Focus on meeting the functional requirements of the system you are developing, and then optimize where it makes sense. I don't think you are going to notice the lack of unsigned data types. But if you really need them, perhaps that should be a signal that a lower-level language is more appropriate for that particular component in the system.
I am also in th5554444&&&&&&
The thing about Java is that despite flaws it was cross platform. that is it was, up until chrome. Right now you can't run the latest java in chrome. (chrome is 32 bit, and java 1.7 is 64 only.) And then there's chromebook which also has no java. And then there's Dalvik. So google seems to be pulling a microsoft on Java. I've switched away from using chrome to boycott google.
Some drink at the fountain of knowledge. Others just gargle.
Actually, Python is strong-dynamic-duck-typed and pre-compiles. Each time you install a Python module, the package manager runs Python to load it as a privileged user--which automatically generates a .pyc and a .pyo compiled native object in the module directory. There are many further implementations of Python (including the ridiculous Pypy, a Python interpreter written in Python) that are compatible with the language; Google supplies Dalvik, a Google-written implementation of Java, so I fail to see why it's any huge obstacle for them to have supplied a Google-written implementation of Python instead.
Java was used for strategic reasons, not technical reasons.
Support my political activism on Patreon.
I'm looking forward to having to support crappily-engineered code in some other language! I'm going to slap the first in-house engineer who suggests we jump on the NetRexx bandwagon.
I'm trying to teach myself to set people on fire with my mind... Is it hot in here?
Great idea! Let's implement everything on our phone in an incredibly slow, dynamically typed language, whose only relevant implementation has a GIL and a pathetically bad concurrency model! That will be great for performance and battery life!
Google is dropping Python for a reason.
If Google had used Sun's Java VM for Android, performance and battery life would have been even worse than you predict for Python. However, Google deployed their own implementation of Java that was specifially tailored for mobile platforms.
There's no reason they couldn't have done the same thing with Python; there are several independent implementations of Python targeted at different use cases. They have the relevant technologies with their accelerated Javascript engines.
With Oracle doing everything possible to kill Java, it's shocking that Java persists.
NativeActivity doesn't support most of the Android APIs, including most obviously the widget toolkit. It's intended for games that just need an OpenGL context and raw input, all other kinds of apps still need to use Java.
And you know what? That's not such a bad thing. A few years ago I guess I was basically a C++ programmer who was in the "Java sucks" camp, and I came back to Java only because I wanted to write stuff for Android. Over time I've come to appreciate the whole platform and ecosystem more. Things I especially appreciate:
I never said Python wasn't strongly typed, and Python bytecode is basically nothing more than an AST. Every existing Python implementation, including PyPy, is ridiculously naive and years behind the JVM, the CLR, or modern JavaScript implementations. Languages like Python are also much harder to optimize due to how dynamic they are. Like JavaScript, it would take an absolutely massive investment to make a decent Python implementation and no one with the resources cares enough to do it.
I'm pretty sure that some respected Computer Scientist said something about premature optimization
I think there is a balance to be struck, putting too much effort into optimising early on is a waste of time but that doesn't mean that languages that make inefficient soloutions easy and efficient soloutions painful are a good thing. Unsigned types are just one of many cases where java does this.
Unsigned types are a good thing for several reasons.
1: They are easier to bounds check. If you have an unsigned type you only have to worry about making sure it is not too large. If you only have a signed type then you either have to make sure all your bounds checks cover the negative case or be very careful not to accidently generate negative values.
2: They can store values twice as large. Sometimes that is the difference between fitting the number you want in one size of data element and being forced up to the next size (which is likely to double your memory requirements).
3: Some algorithms (particulally in crypto) are designed arround unsigned integers of a specific size.
4: the interoperability requirement you mention. Sometimes you have to work with another system where it has been decided by someone outside your project that say a 32-bit signed integer is sufficient.
Don't get me wrong all these things CAN be worked arround but those workarrounds mean lower efficiency AND more potential for mistakes.
P.S. Java does have an unsigned 16 bit integer type despite lacking unsigned 8 , 32 and 64 bit types. It calls that 16 bit unsigned type "char".
But if you really need them, perhaps that should be a signal that a lower-level language is more appropriate for that particular component in the system.
Mixing languages adds extra complexity, especially with stuff like java. So IMO a good critera for a language is what range of "levels" it can cover without having to resort to mixing languages.
note: i'm known as plugwash most places but i screwd up registering that here somehow in the past and now can't register
Functionally speaking, how important is it to have an unsigned data type rather than having the equivalent data type and enforcing a "no negative values" rule?
If your application logic's requirements include being able to represent values between 2^((2^n) - 1) and (2^(2^n)) - 1, such as 128 through 255 or 32768 through 65535 or about 2.1 to 4.2 billion, in a cache-efficient array, you usually want to use an unsigned type. This often comes up when trying to represent the native unsigned data types of an emulated machine or the unsigned data types of various SQL databases. You could use a type twice as wide, but that'd fill L2 cache twice as fast, causing capacity misses. And on mobile, it'd fill RAM twice as fast, causing the system to kill your application for having run out of memory.
I only have two issues with java:
- the constant nagging from the java updater. (Although to be fair, the updater has been killed on any and all of my devices.)
- the braindead way of keeping old version of the jdk and jre around. Words can't describe how freaking lame this is. I only want one java directory, with one jre and one jdk in it. The new versions need to replace the old ones and provide backwards compatibility.
You're not a real programmer if you can't adapt to the lack of unsigned variables.
You're not a True Programmer unless you use Gamemaker! Return! Return! Return! Return!
Return...TO GAMEMAKERDOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOM!
- Most CS programs train their graduates in Java.
- Java is pretty much the enterprisey middleware language these days. I've seen so many J2EE applications alive inside organizations doing mundane but vital tasks.
- Unless you're a web startup, Java is almost universally used for line-of-business application development. That ugly GUI that collects budget numbers from 500 databases and displays an "executive dashboard" was probably slapped together by an Accenture type outfit using offshore new grad coders and sold to companies for millions.
It's just too prevalent now for people to say, "Oracle sucks, we're porting everything to C#." I can definitely see a market for Java talent similar to the COBOL market 30 years down the road. People won't need millions of Java coders anymore, but they'll need older expert types to go untangle messes.
For whatever reason, Java seems to be popular with the work to spec, outsourcing shop types.
Java must be dying - when's the last time you saw an applet? Let's ignore that it's hugely popular on servers, for enterprise development.
"Ahh! I see you're in that indeterminate Schrodinger state where - oh, uh
But if you really need them, perhaps that should be a signal that a lower-level language is more appropriate for that particular component in the system.
Provided that the platform curator even allows the use of lower-level languages. For example, Java applets have to be written in Java, and Xbox Live Indie Games and Windows Phone 7 applications have to be written in C#.* An applet that attempts to use JNI or an XNA game for Xbox 360 or application for Windows Phone 7 that attempts to use P/Invoke will die with a security exception.
* Technically, XBLIG and WP7 allow the subset of verifiably type-safe CIL accepted by the .NET Compact Framework. But in practice, languages other than C# either aren't verifiably type-safe (such as standard C++ in C++/CLI) or require library facilities not present in the .NET Compact Framework (such as any DLR language).
Very much agree with this. The library/API that comes along with a language is just as important, if not more important than the language itself. You don't want your programmers spending any time writing their own hashtable or arraylist implementations. You don't want your developers writing their own sorting functions, and you don't want your developers spending time trying to write their own "date math" functionality. Thie is why I find that .Net is actually quite good. The API is amazing. It includes just about everything, and it's very consistently done. It's also relatively free of bugs, and extremely well documented.
Anthropic principle: We see the universe the way it is because if it were different we would not be here to see it.
Larry Ellison is just another borderline personality disorder businessman who doesn't give a fuck about anything besides making himself richer and self-aggrandizement.
He and Ballmer should go to some private island and never be seen again.
"unsigned integers" are an artefact of "bit twiddling" programming languages. Bit twiddlers are essentially high-level assembly language.
Java is not an assembly language, it is an abstract language. It is intended to create write-once/run-anywhere code that isn't dependent on the CPU or OS, byte/bit orders or how many bits are in an "unsigned integer".
Most programmers actually use "unsigned integer" to refer to a collection of bits, not actually as a mathematical unsigned integer (cardinal number), just as they erroneously refer to characters interchangeably with "bytes".
If you really DO want to work with cardinal numbers in Java, just don't use negative values. A java int can hold a respectably large integer value. And if that's not big enough, there are special classes that are more or less open-ended.
If you absolutely positively must work with 100%-guaranteed cardinal numbers, use Ada, which allows user-defined types to contain user-defined ranges that will be checked at compile time and enforced at run time and that includes integers whose range is from 0..whatever. Of course, there's a price to be paid for that.
I think of it like a George Romero zombie that has plodded along consuming and destroying brains for the better part of two decades and clumsily getting around the shotgun programming language deficiencies with each new release.
Java 8, Unsigned Integer Arithmetic API, not an unsigned type but helps doing integer arithmetic using signed types
Anyone with any real knowledge of Java knows how wrong that is. But, it's been cool on Slashdot to say so and it's automatic karma whoring when you do.
I swear to God...I swear to God! That is NOT how you treat your human!
Java might be a shitty language, but the JVM blows away any existing Python implementation
You're right: The JVM blows away almost any other language in terms of megabytes of physical memory wasted and CPU cycles consumed before getting to main(). And you're not going to be able to run the whole system in one JVM to try to combat this.
and is still significantly faster than any JavaScript implementation.
Mostly irrelevant. Java needs to be fast because most of its libraries are written in Java. Other languages tend to use native code for most libraries, and that's just tied together with the users' business logic. A high-tech JIT-compiled Python would almost certainly be "fast enough".
On the other hand, it has no type meant to store a single character that is capable of doing so.
The creatures outside looked from Alt-Right to Antifa; but already it was impossible to say which was which.
1: They are easier to bounds check. If you have an unsigned type you only have to worry about making sure it is not too large. If you only have a signed type then you either have to make sure all your bounds checks cover the negative case or be very careful not to accidently generate negative values.
So, what does your code do if an end-user passes -1 which would get stored in your unsigned value? And as a reminder, your argument is that you don't have to do bounds checking for the lower bound.
GLaDOS for President 2016! "Well here we are again. It's always such a pleasure." -- GLaDOS, 2011
Scala is not a scripting language
One can make a credible case that Java's decline in market share is due to the "market" for programming languages becoming more diverse over time. Let's consider the languages with the largest market share in 2001, which is the farthest back the TIOBE graph goes:
Java: ~26.5%
C: ~20.0%
C++: ~14.0%
Visual Basic: ~8.0%
Now let's check out each of those language's current market share:
Java: 16.15%
C: 16.98%
C++: 8.66%
Visual Basic: 4.84%
Now we can look at the deltas, both in absolute terms and as a percentage of original share:
Java: -10.35% (~39% decline)
C: -3.02% (~15% decline)
C++: -5.34% (~38% decline)
Visual Basic: -3.16% (39.5% decline)
The baseline decline for languages that enjoyed wide popularity in 2001 seems to be 15%. Java is declining, but seems to be doing no worse than C++ and Visual Basic are. (Which is perhaps damning with faint praise.) However, unlike C++ and Visual Basic, Java is declining from a position of dominance (at least in terms of TIOBE metrics).
IMO, if any language should be worried it's Ruby. Ruby is already less than half as popular (1.5%) as it was at the peak (4%), and it's more-or-less eclipsed by Python. There are some credible reasons to prefer Java to Python/Ruby in certain contexts (e.g. Android, where it's the only game in town). There aren't many strong reasons to prefer Ruby to Python, esp. given the larger Python development community makes it easier to hire devs.
On the other hand, it has no type meant to store a single character that is capable of doing so.
But then no language has. In C++, std::string is the simplest thing guaranteed to store any single character.
All the ones on Windows, anyway.
so heavily optimized that often Java apps can even match the performance of C programs
Benchmarks?
You may not have noticed but a number of manufacturers are going down the road of using HTML5 web apps as their mobile application platform. JavaScript certainly seems to fit your description. Actually, it doesn't have a concurrency model at all.
When Java first came out it was also incredibly slow and had a pretty primitive concurrency model. It's taken many years and a crapload of cash to get it to where it is now. Python hasn't had any cash to speak of.
Python rund fine on Android.
The Android Java VM and the Android Java dialect are nevertheless helpfull, as you have interfaces to describe services and compile time type safty.
Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
It would be nice if java supported something like typedefs.
Python: 'And then suddenly you have a language which says "we're all stuck with whatever the whiniest coder wants".'
The same idiots who pushed C++ on us hate Java because it is not verbose and not "powerful"--i.e. it is easy to use and safe.
For something that's not a "real" language, it certainly seems to have significant penetration in the enterprise.
The world's burning. Moped Jesus spotted on I50. Details at 11.
No really it will. Apparently there's a law that says to have a website you have to run 45 different Javascripts nested 4 layers deep or more. And because of it basically 99% of the hosts out there are essentially slow junk.
Noooooo....if they mated, they'd produce Satan's offspring more terrible than either of them alone. No, I think it best if we send them to private islands on different planets.
Erm, how can your first sentance and the last one fit together?
Exactly because Python is dynamic typed it is inferior as a systems programming language in regards to Java.
The obstwcle is the "instead".
Especially as there are python implementations for android, your rant is obsolet, just take them.
Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
sort of. .NET is good simply because of Visual Studio and intellisense and all the other "make it easy" features they have - features I'm sure they could have added to other languages.
But .NET is missing loads of stuff, the last one I found was the lack of a graph or tree container, a dictionary just doesn't cut it. Oh, and I keep using Single() in my EF LINQ calls.. which doesn't support it, even though its a method on IEnumerable... lovely that, an interface that supports some methods some of the time.
So no, the API is not a good thing as it constrains you into using it and the bigger the API the more people think they have to use it, and only it. Other languages do much better in this regard, by letting you add in libraries for various functionality as you need it, so if I needed a tree container, there would be one, or more, standard libs available for me to fetch and pull in. Then my library of libraries would be filled with whatever was needed today - not what was hot 5 years ago when that API was thought up.
And it'll stick around for just as long...sadly
I've never seen Python do that on my systems. Those files (.pyc) don't appear until I actually cause them to be loaded for the first time. I think you're confusing what python does with what your distribution maintainers do :P
For large sets, this will be our guide even unto death, for the LORD will work for each type of data it is applied to...
I don't appreciate having to pay for the IDE for personal or educational use. IntelliJ can fuck off, back to Netbeans/Eclipse I go.
For large sets, this will be our guide even unto death, for the LORD will work for each type of data it is applied to...
Yeah, that worked real well when j2me was the only game in town. The phone companies were so amenable breaking out of the sandbox.
As one of those "real programmers" who did work around the sign bit for bignum math, I laugh at you and the anonymous retard above, who didn't even get the bitmask right. Being able to work around other people's stupidity is something that "real programmers" can do, but it isn't something that makes them a "real programmer".
Microsoft does try install Bing cruft every time one updates Skype however.
So do Microsoft Access (or, gods help us all, Excel) "databases" and PHP.
Talk about damning with faint praise.
Unsigned integers are not just for optimization.
I remember as a young pup writing a part of a program which suddenly crashed in certain circumstances but not on NT only in Win95.
Of course the problem was not detected until the program was out in the field because all the developers used NT.
I was using memory mapped IO. At one point I was reading from I something in an array of variable size. At the end I was supposed to determine how many there were. Simple enough calculate the length divide by the size.
So I cast the final address and the base address into an int and subtracted to get the length.
Turns out that when using NT the address of memory mapped IO is something like 0x1XXXXXXX and on WIn95 it's 0x8XXXXXXX. So on WIn95 the addresses got cast into negative numbers and returned a negative length. All because I used ints instead of unsigned ints.
BTW when I worked at Lucent, I got a chance to speak to one the the automated testers. Turns out that often times when you run an automated stress test, and get an intermittent failure a couple of times out of a thousand that it is usually an int somewhere that should have been declared an unsigned int.
IMO, an optimal type system does not contain every type anyone anywhere might need at any time. It does contain the primitives from which developers can construct their own. Do I need a 36-bit "word" type? No, but if I did, I know how to construct one, in any of the statically typed languages I know. A Roman Numeral type? Same. I do not expect a language to be burdened, at least in the core language or standard libraries themselves, with either of these types, so long as I can construct them out of what the core language/libraries *do* contain. In most modern languages, which are Unicode-aware, the very concept of what constitutes a "character" is somewhat complex, but that complexity is buried in the implementation of a String or similar class. And the String class already does a superset of what you are asking. It will store a single character. (Or zero characters, or multiple characters). A subclass of String could trivially be designed to hold one, exactly one and only one, and still be Unicode-aware. Or, if you don't care about Unicode, and define "character" as simply a character representation of an unsigned 8 bit byte, then, notwithstanding Java's unfortunate exclusion of unsigned char/short/int/long types, you still can construct a class that will do what you want. Now I can't promise optimal C-like efficiency in either case. If you truly do need that, well, my Java may be too rusty to help you in detail, but I'm guessing there are multiple good approaches. Including just writing it in C and using JNI or whatever the modern equivalent is today. I sympathize with your frustration over Java lacking some of what even I would consider basic primitive (unsigned) types, and I happen to prefer C# over Java for that among other reasons, but Java's popularity and widespread use across virtually every niche and industry segment all suggest that there are ways to work around and/or through it.
Nonaggression works!
My employer has had real trouble hiring an Android dev to back me up. Totally anecdotal, but there you go.
char []?
Oracle offeres it for free on many platforms. Java's similar competitors C# and ObjectiveC cant make that claim.
Premature optmztion is rt of al evl.
It would probably become UINT_MAX, then I suppose what the GP means is that the value would violate the upper bound check, and then implicitly and magically fail the validation without having to type an extra " || x 0".
Yep I think the argument is crazy, but at least the code works.
Don't quote me on this.
The .Net library doesn't constrain you. If you don't like it, it's very easy to get another library that offers more functionality, and use that. Over the years, I've used third party libraries for things like FTP, Email, data charting, PDF rendering, and plenty of other tasks. Some of these, like data charting (bar graphs, pie charts), are now handled well by the .Net APIs, but they weren't always. But if you have more complex needs which they don't cover in their charting libraries, then there's tons of third party libraries which offer even more functionality.
Anthropic principle: We see the universe the way it is because if it were different we would not be here to see it.
Checklist:
* Hugh Pickens DOT Com
* Clickbait summary
* Absurd premise
* Trolling conclusion.
I'm a good cook. I'm a fantastic eater. - Steven Brust
It would throw an exception at the site of the cast. Why do you think Java would be dumber than C with warnings turned off?
You apparently don't know the difference between something the VM should be doing and having to repeat stupid boilerplate like this a thousand times:
if (index < 0) throw new IllegalArgumentException()
Choosing a language is much less about technical requirements as it is about HR requirements. A while back I was watching a company that built their applications around LISP, but ended up switching to C++ due to Universities not providing enough 'ready to go' developers who use the language. Another company that I worked at ended up switching to Windows for the same reason, they had too much trouble finding Linux developers fresh out of school in the right domain, so it was cheaper and easier to move the whole system to Windows then to train up people on Linux constantly.
Wake me up when java supports unsigned integers. Until then it's not a real language.
While unsigned numbers are great for a few things, mixing them with signed numbers is a real pain. Just consider all the C functions, which take in unsigned but return signed, and casting galore that follows. Of course you can just disable relevant warnings entirely and blindly hope implicit casts anywhere will never overflow, but that is kind of sloppy, and just asking for someone to find a way to use it for an exploit. Which incidentally is what most C code does.
a "char" would be 8 bits
I love my signed/unsigned variables. When you do high level programming this is the kind of shit you don't want to worry about. It makes code easier to read and understand AND it has zero impact on the performance of the final product. The compiler brings it back to it's native form.
Now, if you do low level programming I understand you don't want the signed/unsigned BS but Java is mostly for high level programming so it's a moo point.
Yeah, no Java programmer needs unsigned ints. It's not as though they need to interface to code which does have unsigned ints, like calling C++ libraries, or reading data from files or databases created by C or C++ programs, or reading files in standard, language-agnostic formats which are packed full of bytes that you then have to process as 16-bit signed integers instead.
Lack of unsigned variables is one of the most braindead ideas in Java.
So I cast the final address and the base address into an int and subtracted to get the length.
If you're ever, anywhere in your code, casting pointers to integers, and it's not because you're passing it to some low-level interface to hardware... you're almost certainly doing something wrong.
Let's be clear on what /. used to be and what it has become.
Seastead this.
If Python, Ruby, PHP, and Javascript were sled dogs, they would be following Java. and the view would never change.
Sure has a cutting edge website, readers are no doubt the technical leaders of the world.
Your choice comes in the form of picking the language that suits your needs.
Characters suck. C++ and Python both allow easy 32-bit characters, which at least allows you to store one Unicode codepoint per "char". But in non-Western languages there are still glyphs that must be composited from several codepoints.
But why would anyone care? UTF-8 works fine for sorting and comparing and so on, it's well designed that way.
Socialism: a lie told by totalitarians and believed by fools.
...it's just compiling.
Do what you can, with what you have, where you are.
No, that's just wrong.
Often you have a value for which negative numbers are always wrong/senseless. An unsigned type neatly encapsulates that constraint. It trivially becomes part of the API contract that "negative values don't make sense, so you can't pass one here".
ADA of course takes it a step farther, allowing both min and max constraints on any integer. But the "non-negative integer" is a common enough special case to justify a type of its own.
Oh, and your completely misusing "cardinal number" - when you use big words to try to sound smart, but get them wrong, it's quite embarrassing.
Socialism: a lie told by totalitarians and believed by fools.
Yes, just like COBOL. And just like COBOL, it's mostly used for the most boring sorts of "Enterpise" software (which used to be called "card-whalloping code" back in the day).
The phone thing is new, and at least gave Java a new chance at being cool. Hasn't worked out that way so far, mostly because, like COBOL, there's all this annoying wordiness and boilerplate all over the place, so it's hard to ever feel the result is "elegant". And if stuff you write on your own can't be "elegant", that just uncool.
Socialism: a lie told by totalitarians and believed by fools.
I don't code out of some desire to be a hipster. As we speak, I'm writing a Joomla component in PHP, a language I loathe (though it has improved of late), but it's the language the project requires, so here I am. In a few months, maybe I'll be coding in Java, if the project requires it. For me, the one place I have little or no desire to go is to any of the .Net languages, simply because of the lack of meaningful portability.
The world's burning. Moped Jesus spotted on I50. Details at 11.
who said java was dying (apart from some of the dozens of clueless tech-tabloids regularly cited on /.) ?
Swing was more powerful but was still very ugly and was hobbled by the lack of any truly great UI designers for it (every IDE creator invented their own).
I've seen non-ugly GUIs done with Swing. I'm pretty sure they're a demonstration of the fact that pigs can fly as long as you provide sufficient TNT-derived thrust (and that you don't really want to stand underneath as the pieces soar overhead).
"Little does he know, but there is no 'I' in 'Idiot'!"
No it is not! // compiles // does not compile // does not compile
char a = 1234;
char b = a + 15;
char c = 15;
char d = a + c;
Everywhere a char is used (and the java code actually compiles) the char is promoted to an int, an signed int.
Just because a char is 16 bits wide and arguable a 'variation' of an int does not make it a useable 16 bit unsigned int.
Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
> a "char" would be 8 bits
It's the 21st century. A byte is 8 bits, something computers use. A character is something that is the basis of human languages and comes in many, very many, different varieties.
There are various ways of encoding characters (for humans) into bytes (for computers) and then later decoding them back to characters again. Several of these 'charsets' or 'character encodings' are standard and well known. UTF-8 is a particularly nice way of encoding characters because in one byte it can represent the commonly used Roman characters and ancient 7-bit ascii from some forgotten millennium long ago swept away in the sands of time. Any character can be coded as UTF-8 and may end up encoding into multiple bytes. Those bytes are just as easily decoded back to a string of characters.
Banish from your thinking the very idea that characters and bytes are the same thing and are assignment compatible. They are not assignment compatible. An array of characters is passed to an encoding function to give back an array of bytes. And vice versa.
I'll see your senator, and I'll raise you two judges.
How am I supposed to take a platform seriously if the fundamental piece that has to be installed by all developers
You had me up until said you "all developers".
Developers need the Java Developers Kit, which notably doesn't prompt you to install toolbars. Nor does the JRE installer on the Java developer site (which used to be java.sun.com).
Unfortunately, unless you know to grab the installer from there...
GLaDOS for President 2016! "Well here we are again. It's always such a pleasure." -- GLaDOS, 2011
I don't know what you are talking about, EF does support .Single() just as any other LINQ method works on an IEnumerable (here's a question about it). If it was throwing an exception, it's because you had more than 1 item meeting the criteria, and you don't know what you're doing. Try .FirstOrDefault(), which will not throw an exception.
As for why there is no Tree class in .NET, you can refer to this question, where the answer is enumerated for you. Having worked with .NET since 2003 when it came out, and in the interim having to work with Java, Obj-C, and other platforms, .NET is without question the most "well done." Typically if you're having problems like you cited above, it's due to a lack of understanding on your part.
Even Microsoft doesn't try to install Bing with the .NET installers, and that's their own property they're desperately trying to push on everyone.
They install it with the OS.
"First they came for the slanderers and i said nothing."
Yeah, no Java programmer needs unsigned ints. It's not as though they need to interface to code which does have unsigned ints, like calling C++ libraries, or reading data from files or databases created by C or C++ programs, or reading files in standard, language-agnostic formats which are packed full of bytes that you then have to process as 16-bit signed integers instead.
In other words, "bit twiddling".
Java has had closures, with all the stuff that does to local variable lifespan, since Java 7. Lambda expressions are just syntactic sugar for writing small closures.
> Any *real* programmer that used anything but a toy language would understand why unsigned integers are important.
As the Minbari ambassador Delenn says, it's all a matter of perspective.
If you don't program close to the bare metal, then you seldom, if ever have a need for unsigned integers. Think of languages as a continuum starting from the very low level of abstraction (assembler) to the very high level of abstraction (Mathematica, Clojure, Scheme, Haskel, Scala, etc). What you call a real language and a toy language all depends on what kinds of software you write. If you are working on symbolic reasoning, you probably use a different language than you would if you were writing an mp3 encoder. The former would call C a toy language.
Also, if you happen to have the PBS NOVA documentary about IBM's Watson (a couple years ago), pay attention to some of the close up screen shots of the Watson developers' laptops. It's all (gasp!) Eclipse and Java. OMG -- those not "real" programmers need to use a language with unsigned integers! How can they expect to accomplish great achievements without unsigned integers! (Gee, I wonder if they ever once, one single time, thought: "drat -- I wish Java had unsigned integers".)
I'll see your senator, and I'll raise you two judges.
If you want to complain that Java lacks the ability to define its own non-class data types, I'll be glad to sign the petition. Although I don't like "special case" types, and the 0..(some limit) sequence isn't really any different than any other range-restricted integer type other than in popularity.
As for definitions of Cardinal and Ordinal numbers, those were the ones foisted on me in 5th Grade. Blame my teachers for not being enough into advanced Set Theory.
And if that end user is working with a boundary constrained entry field?
No, that wasn't the problem unless the memory mapped region crossed the boundary from 0x7FFFFFFF to 0x80000000. For example, 0x90000000 - 0x80000000 is 0x10000000 whether you use 32 bit signed or 32 bit unsigned arithmetic.
Also (this might not have applied at the time of Win95 and crappy Microsoft C compilers) it is legal to subtract one pointer from another in the same array (or one past the end of it) without converting to an arithmetic type.
All I want is a secure system where it's easy to do anything I want. Is that too much to ask ~~ Randall Munroe
> sort of. .NET is good simply because of Visual Studio . . .
In case you are not aware, there are some very nice IDEs, even free and open source ones, for Java. And the IDEs run on any platform, just like the rest of Java.
I'll see your senator, and I'll raise you two judges.
You know, it's not like Java lacks unsigned types because they simply forgot about them. It lacks them because experience with C and C++ indicated that mixing of signed and unsigned types can lead to lot of weird bugs. It's one of the reasons those languages have a reputation for being giant cannons pointed at the developers feet.
On the flip side, although lack of unsigned types probably makes pure Java code more robust, the moment you have to do any kind of parsing of file or wire formats it immediately becomes a sharp edge with which to cut yourself (that and the decision to make the JVM big endian - doh!).
Ultimately I'd rather Java had unsigned types, if only to make interop eaiser, but the line between safety and features is always a finely balanced judgement call.
It's an object oriented language. If it's missing a type you need, go make one.
Weaselmancer
rediculous.
A real programmer uses the tools that are available or mandated. A real programmer knows how to code around the limitations of whatever language they are using. When I program in C, I use unsigned types all over the place. When I program in Java, I barely notice they are missing. Certainly, the lack of unsigned integers in Java is far less of an inconvenience than the lack of a proper string type in C.
All I want is a secure system where it's easy to do anything I want. Is that too much to ask ~~ Randall Munroe
> Static typing is valuable for catching lots of coding errors before execution.
Yes.
Also, there are subtler benefits to static typing. It enables excellent 'toolability' of the language. That is, your IDE can do 'intellisense' type stuff and get it right. It can know exactly what members to offer on a variable or value of some particular type.
Furthermore, the static type checking done by the compiler is your very first line of testing before you get into your own higher level unit tests that test the deeper logic of your code. Think of static typing as the compiler unit testing your code for obvious logic errors and assignments that couldn't possibly make sense at runtime.
I'll see your senator, and I'll raise you two judges.
IntelliJ IDEA Community Edition is both open source and free, so your comment is a pretty epic failure. As it happens I bought the Ultimate edition during their end-of-the-world sale that was in the hours before the Mayan calendar predicted armageddon, so I got it cheap. Best doomsday scenario ever!
Now that's just plain wrong. C'mon: there's nothing about Larry's personality disorders that should be described as "borderline".
Ballmer at least has the grace to exit - give him credit for that!
Socialism: a lie told by totalitarians and believed by fools.
one can also make a solid case that that data is random bullshit.
hmm, wordiness is irritating, I'll grant you, as is boilerplate. But, it just stops being irritating the moment that your IDE starts taking care of all of that for you. Writing Java from the command line is an exercise in extreme torture, but Eclipse makes it just fine. Liberal use of ctrl-1, ctrl-space, and the refactor functions on context menus and the actual menu make most of these annoyances trivial. Also, I have yet to see something that can refactor javascript as well as eclipse refactors java.
Also, cool I define by how powerful, flexible, and quick a language is to accomplish tasks. Boilerplate in the age of modern IDE's seems to have almost a negligable impact on those metrics. Boilerplate and language redundancy also often helps with human parsing of the language, imo, so it might even have a bit of a positive effect.
Lastly, I almost never agree that 'terse' is elegant. Elegance should only be clever in what it is actually doing, not in how it is being expressed in the language.
The Windows JRE installer is an obnoxious piece of crap. Fortunately modern JDKs ship with something called the JavaFX Bundler, which makes native installers (exe, msi, dmg, rpm, deb) for each platform that bundles a stripped down JRE with the app, so there is no need to install the JRE or keep it up to date. If you are distributing consumer software or don't want to handle the problem of keeping JREs up to date, it's useful.
There are also tools that can eliminate the need for the JVM entirely, for instance by ahead of time compiling entirely to native (Excelsior JET is one such program), or alternative JVMs that sacrifice some performance for code size, like Avian.
Oh, most people are innumerate these days.
Nothing to do with set theory, really. Cardinal numbers indicate a count of objects: "one, two, three". Ordinal numbers indicate an order - a position in a sequence: "first, second, third". The major usecase for unsigned numbers is really indexing into arrays/collections (you don't know the max at compile time, but you do know the min) - in a sense those are ordinal numbers - positions in a sequence.
Some people use "whole numbers" for the non-negative integers, and "counting numbers" for the positive integers, but I never heard those terms in college math classes. And anyway, I'm a programmer, I count from 0!
Socialism: a lie told by totalitarians and believed by fools.
I said the package manager does it. When you run Python, it generates the .pyc and .pyo files for modules loaded:
Each time you install a Python module, the package manager runs Python to load it as a privileged user
The .pyc and .pyo files for system libraries are generated at installation time, because a non-privileged user running a Python application wouldn't be able to store those files in a system-wide location (for good reason: you could store malicious ones and jump across security zones by injecting code into other users' applications by replacing some runtime files with new ones that get loaded the next time they use that application).
Support my political activism on Patreon.
Search for "intelliJ IDEA" and try to find any mention of that on their page. Not quite so epic a failure in reality, was it?
Nice catch on the deal though.
For large sets, this will be our guide even unto death, for the LORD will work for each type of data it is applied to...
It would be nice if java supported something like typedefs.
What for? Either you're doing it to name a type elegantly — except you don't need that in Java because classes already have reasonable names and you don't have a mess of structures as values plus pointers and references, as in C++ — or you're doing it to hide how complex the implementation of a data structure is — but there you're really encouraged to wrap a class around it and put an honest API in place — or you're doing something like aliasing. Aliasing isn't a great idea either; it's very non-obvious when used in substantial amounts. No, the lack of typedefs is not something that is particularly felt by Java programmers.
I'd much rather have the built-in DOM support integrated into the standard collection model; that would genuinely save a lot of messing around.
"Little does he know, but there is no 'I' in 'Idiot'!"
Having done both Java and C#. I choose to take the C# jobs now because the language is a lot more fun. Nothing to do with fashion. If you're managing your career well, you should eventually get to the stage where you can choose a platform that is pleasant to work on, by whatever subjective measure. I code for money, no doubt, but there's no reason to do that on an irritating platform, once you have the choice. Starting out, we all have to pay our dues, of course - someone has to do the shitwork.
For fun projects I write C++, because I can be sure that proper style is used when I'm the only coder, but professionally I cringe at legacy C++ codebases.
Socialism: a lie told by totalitarians and believed by fools.
Closures and lambdas are not the same thing actually.
Guns don't kill people; Physics kills people! - John Lithgow as Dick Solomon on Third Rock From The Sun
It's an application programming language, not a system programming language. Android is a Linux system written in C and C++ mostly.
The argument was that the current Python implementation wasn't good enough; the counter-argument is that neither was Java, since Google wrote their own and use a different bytecode. (Oracle sued Google because Google "java" wasn't real "Java").
Support my political activism on Patreon.
None of the very nice IDEs I've tried have come close to being as nice as VS. Eclipse is OK, so is Code::Blocks, but nowhere near the magic ease-of-use and power combination that VS offers. VS isn't perfect, and it's ease-of-use has started a downward trend since VS9 in 2008, but it's still far beyond all the open-source IDEs I've tried under both Windows and Linux.
Google wrote their own JVM because the JVM is a piece of shit that wouldn't work. They use a different bytecode completely incompatible with Java JVM bytecode. Uncompressed Dalvik is smaller than compressed JAR for the same Java class. It's also faster, and consumes less RAM.
Support my political activism on Patreon.
If the IDE can automatically insert it all, why not have the compiler do so? This is why I find Java too irritating to work with, but to each his own.
Terseness is a necessary but not sufficient condition for elegance.
Socialism: a lie told by totalitarians and believed by fools.
What part of "So I cast..." did you not understand?
Yes, I have too - IntelliJ itself is written using Swing and it's quite appealing on all the platforms I've used it on. But I guess that they had to develop custom themes for it and be very careful to achieve that.
JFX8 looks great out of the box. It supports hi-dpi/retina displays and has a generic cross-platform theme called Modena which is a lot more tasteful than previous Java desktop themes. It doesn't match any particular platform, but I've been writing an app with it on the Mac and it can actually look better than Aqua sometimes. Still, the theming system is powerful enough that you can also get AquaFX which matches the theme in MacOSX Mountain Lion (it's done by a third party).
Just to ram home the point about Maven+IntelliJ, enabling AquaFX in my project involved typing in the following code:
if (System.getProperty("os.name").toLowerCase().contains("mac")) {
AquaFx.style();
}
(you're only allowed to use AquaFX on a Mac because of the art being copyrighted by Apple, etc).
Of course AquaFx is an unknown class, so I just asked for an auto correct there, told it to find the class in Maven, then did an interactive search for AquaFX in the resulting dialog. Press enter, and it was downloaded+installed in the background. Also the build system definition (an XML file) was updated so people building from the command line or using other IDEs would also see the dependency. A few seconds later the code is no longer red and the app runs.
It may well be that .NET has something similar, and I know most scripting platforms have this sorted out these days too, but it's nevertheless very convenient to have it so tightly integrated.
Comment removed based on user account deletion
Java is evolving nicely. JVM languages, such as Scala and Clojure, are booming, and awesome to work with. C# , and .NET, are going the way of the Soviet Union.
>So, what does your code do if an end-user passes -1
Every verilog coder knows that you would get '1
I should use this sig to advertise my book ISBN-13 : 978-1501515132.
A real language would have reals, integers, natural numbers, complex numbers, rings, groups, fields, modular groups, vectors, matrices and booleans.
I should use this sig to advertise my book ISBN-13 : 978-1501515132.
If ISO-8859-1 was good enough for Suetonius, Jesus and Shakespeare it's good enough for the likes of you.
Want to draw heiroglyphics, Pitmanesque squiggles and Morse chuffing code? Do them as gifs.
Confucius say, "Find worm in apple - bad. Find half a worm - worse."
What's interesting is that I've had the opposite reaction. When I use VS I'm amazed at the lack of functionality it has compared to Eclipse. Why the hell can't it just "import what's needed like Eclipse can" for me rather than making me click on silly little drop-downs which only show when I hover over squiggly-underlined types it can't find? Just one rant but I hit things like this all the time in VS (or VS2012 at least - the last one I used). That and I have to get used to compiling again. ;-)
It all comes down to expectations.
"Ignorance more frequently begets confidence than does knowledge"
- Charles Darwin
Well, I agree UTF-8 is good for storing and rendering (and it supports the full Unicode range [and then some], Unilke 32 bit chars), however, unless you are normalizing your composed characters (decompositions) then Unicode isn't very good for comparisons or sorting, and neither is any encoding of Unicode, such as: UTF-8.
The problem is that normalized (decomposed) compositions can take up a lot more memory than the composed character, esp. in UTF-8 (which favors the western characters). Since memory (and bandwidth) is no longer as much of a concern UTF-8 is fine, but we should not store compose characters except for internal representations... However, I've yet to find an implementation that properly handles the normalization features of Unicode 3.0 as well as over-long forms -- both can be leveraged as exploit vectors: the former by improper sorts and duplicate displays despite different representations, and the latter to bypass input validation.
Furthermore, at the lexical level Unicode is poorly supported, for identifier names, etc. See also the above exploits and more, then occurring at the source level. I've a toy compilable language in the works that handles these issues and more, for which I've had to implement my own Unicode processing functions. It's remarkable how poorly nearly all languages fail when I start applying my unit tests to them...
I'm of the opinion Earth needs a single official language, but I'm disheartened that it will be English -- The least machine comprehensible of them all. Oh well, there's always next big bang.
I just Googled IntelliJ IDEA (didn't use quotes), and two of the links that were neatly arranged for me were "Community Edition" (which seems like a Big Flag to me) and the Download page, which as noted above includes both the full-featured and open-source variants side-by-side. It's also worth noting that Google has adapted IDEA into the "official" Android IDE.
Save Maine's economy: write stuff down. All comments are exclusively my own, not my employer.
You should have seen language before this big bang!
Yeah, composition sucks, but fortunately there just no reason to care how much space human-written text takes up these days (logfiles are a different matter). The biggest weakness in the Unicode standards is the lack of semantic information IMO. They should be releasing normative tables of machine-readable metadata about characters. It's still maddening just to write ToUppercase() in a cross-cultural way, and there's just no reason that should be hard.
I've written "any encoding to good clean Unicode" readers that handle broken encodings well, but I just can't figure out where to even start on composition. Something from the standard to make it all clear (for every reasonable composition) would sure be nice.
Socialism: a lie told by totalitarians and believed by fools.
That is the battle cry of the inept programmer.
There is a difference between premature optimization and blatantly writing inefficient code because you don't know any better.
Yes, I have too - IntelliJ itself is written using Swing and it's quite appealing on all the platforms I've used it on. But I guess that they had to develop custom themes for it and be very careful to achieve that.
JFX8 looks great out of the box
Agree about the difficulty with Swing. Swing permits different look and feels to differ too much in essentials like ordering of operations, focus, and etc. It makes it very hard to adjust the styling of individual components and expect it to do anything reasonable in different look and feels.
JavaFX sounds really good, but I've not yet developed against it. Thanks for the link to SceneBuilder, I look forward to playing with it.
- jon
Ganymede, a GPL'ed metadirectory for UNIX
The TIOBE data or my summary?
This is what happens when you confuse anecdotal evidence with fact.
'The tyrant will always find pretext for his tyranny.' - Aesop's Fables
It is now official - Netcraft has confirmed: *BSD is dying Yet another crippling bombshell hit the beleaguered *BSD community when recently IDC confirmed that *BSD accounts for less than a fraction of 1 percent of all servers. Coming on the heels of the latest Netcraft survey which plainly states that *BSD has lost more market share, this news serves to reinforce what we've known all along. *BSD is collapsing in complete disarray, as further exemplified by failing dead last in the recent Sys Admin comprehensive networking test.
Fuck Ajit Pai
Your kidding right? C++ supports many types of characters, including Unicode and arrays of those characters.
C++ supports bytes and arrays of bytes (statically-allocated ones at that). The rest is in the library.
Stick Men
ISO-8859-1
The one with those funny marks on the letters? Bah. ASCII. The eighth bit is just a spare. If you can't do it in English, then it isn't worth doing.
> ASCII. The eighth bit is just a spare. If you can't do it in English, then it isn't worth doing.
The Vorlons would disagree.
I'll see your senator, and I'll raise you two judges.
Benchmarks are the worst possible way of measuring program speed, except for all the others that have been tried from time to time.
-- with apologies to W. Churchill
This is a stupid thing to even argue about, but I've been using Java for a decade and have barely needed to do these things you mentioned. I suspect they're done so rarely that the collective time saved from not having to deal with mixed signed/unsigned types in APIs far outweighs the joys of having an extra bit. And when you need to, support for byte arrays is really very good.
Wrong. You aren't a real witch if you don't pass basic hex.
Any insufficiently advanced magic is indistinguishable from technology.
"ToUppercase() in a cross-cultural way" ... doesn't mean anything. Case rules vary between languages, when you ask for Unicode to somehow solve this you're asking for cultural imperialism. "I want one case rule, so other cultures will be exterminated". That was never the purpose of Unicode, maybe start your own "Uniculture" forum where you agree to wipe out all the people who don't wear the same kind of clothes and eat the same kind of food. Good luck with that.
No, I'm asking for a mapping. For every codepoint, identify as L/C, U/C, or n/a. Then give me a mapping between each L/C and U/C letter. If there are some cases where this mapping varies by culture, add that to the input. Whatever. But there are already rules in place for this wherever the concept applies - collect them into the standard normatively.
I should not have to be an expert in every human language to write ToUppercase(). Take the rules that every schoolchild knows in each culture and collect them - the Unicode guys collectively know all this stuff, and it's somewhat documented in non-normative appendices and such, but it needs to be part of the standard, which will ensure completeness and accuracy.
BTW, can you give me an example of where the L/C -> U/C mapping varies by culture?
Socialism: a lie told by totalitarians and believed by fools.
i was referring to the data, actually.
nothing wrong with your summary, except it is based on a popularity contest based on some arbitrary counting of arbitrary google searches. even without checking their measurement method (which is pretty dumb, imho), you should see at first glance that there is something fundamentally wrong with a result of [16.15% java vs 4.84% Visual Basic].
You are not mixing apples with pears but with stones. Hint: a stone is not fruit.
Google implemented its own VM for Java because they had certain goals they could not achieve with the original concepts/implementations of the Sun JVM. Perhaps you might read about the inception and evolution of the Dalvik VM?
That has noting to do with the language.
On Android obviously Java is a systems programming language. Or why is it used for most system level programming?
The argument was that the current Python implementation wasn't good enough
That is your argument or the argument of an idiot whom you follow. Python simply is not suited for "applications" that interact via interfaces with other applications (like accessing the contacts book and the calendar and sending an automatic birthday greeting text message). Why? Because you can not define typesafe the interfaces in Python to:
-- the address book
-- the calendar
-- the text message system
Python was always mature, that never was the question. It is just unsuited to certain tasks.
Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
The problem lies in UCS-2 and UTF-16. The former can't even represent most of Unicode, the latter includes all worst points of UTF-8 and UCS-4: it's not text, needs complete new APIs, any corruption corrupts the rest of the text rather than just a single character, doesn't allow random access, etc, etc.
The creatures outside looked from Alt-Right to Antifa; but already it was impossible to say which was which.
True, I can find another language. But the other language just happens not to have a runtime environment on the target platform, as 0xdeadbeef and I pointed out.
You're assuming it's the user that gives the input. Unsigned values are great in things such as automatic counters which only count in one direction. Gives you twice the space as signed values and you really do only have to check the upper bound and handle the case where it overflows back to zero.
Classic use case: timekeeping in microcontrollers. Admittedly though you won't be using perl or ruby for that.
Cardinal numbers indicate a count of objects: "one, two, three".
Such as a count of each distinct item on an order and a count of cents that the customer paid for each item. For obvious reasons, a negative value would be inconsistent.
Ordinal numbers indicate an order - a position in a sequence: "first, second, third".
Ordinal numbers have two mappings to the cardinal numbers. A "zero-based count" represents an ordinal as the number of items that have already been considered: zero, one, two. A "one-based count" represents an ordinal as the number of items that will have been considered once processing of this item is finished: one, two, three.
John Carmack @ID_AA_Carmack 26 Sep
Hardware does get faster more rapidly than software gets slower -- I'm finding Eclipse perfectly usable on modern hardware.
You may want to hash them for maps or sets, log them out, or even save to disk (the latter might not make sense at first glance, but sometimes it's convenient as it provides an "unique ID" for objects in a saved file, helpful if your data is an arbitrarily connected graph).
Coding etudes
The fact that lack of unsigned integers has not stopped Java shows that the designers made the right choice. If you need to have a value larger than 2bn you will probably not be satisfied with 4bn and will need a larger type. And in general, you rarely need to operate numerically without a sign.
1: Those bounds checks come at a cost of having overflows getting in the way of actually checking bounds. An overflow of an unsigned value results in just a small number... that means that you still have to check the lower bounds no matter what.
2: They store the same number of values as unsigned, it's just handling of those values and comparison operations differ. A signed and unsigned 32bit integers store 2^32 values.
3: Crypto algorithms do not operate numerically, thus 2147483647 * 100 will yield exactly the same result for uint32 and int32 as much as any crypto algorithm is concerned.
4: Therefore you send 2147483648 in binary form as 4 bytes = 0x80000000
And what 32 bit integer is not a 32 bit integer in C/C++ or Java?
I've been working with Java since 1997, and the greatest part of my work since then has been in Java (was doing lots of Unix kernel work and 2-tier/client-server database style projects before that).
In that entire time, only immediately after the dot-com crash in 2001/2002 and for a year or so after that did I find it difficult to find a job where Java was the main skillset required. It might be highly locale-specific; I live in the San Francisco area, and there are piles of both startups and large multinationals that do Java work (although I *have* noticed startups using more Scala and Groovy lately).
But I haven't ever gotten the feeling from the job market that Java is dying.
- Tim
True that. For more questionable data I just searched for "java", "c++", "visual basic", "ruby" and "python" at LinkedIn, limiting the search to within 50 miles of my residence, which is a "moderately" tech heavy medium sized city. Omitted "C" because it generated too many false positives:
Java: 273
C++: 160
Visual Basic: 52
Ruby: 82
Python: 173
For extra fun:
Android: 58
iOS: 67
Minecraft confirms that it's not dying. Does that count?
sub f{($f)=@_;print"$f(q{$f});";}f(q{sub f{($f)=@_;print"$f(q{$f});";}f});
plain wrong.
I have a compiler that proves it. I'm writing simple code, I have a query that ends in .Single() and the runtime throws an exception, telling me to use First() instead as Linq to entities doesn't support this method.
I understand the difference between first and firstordefault, I know what I'm doing, and I can read the exception text. (caveat: I'm using .net 3.5, It wouldn't surprise me if they've changed it in current versions) I still think its nowhere near as clean a language as C# proponents keep claiming, not any more at least. .NET is the most "well done" if you consider developer happiness using it is the only factor. It is nice, it is easy, but I think all of that is down to the environment, not the language. Try coding C# in notepad to see what I mean.
you miss my point - that C# is a bit pants if you don't have VS. No VS = C# becomes just another, reasonably crappy language with loads of "evolved" functionality that occasionally is just nonsense,
Try coding C# in notepad to see what I mean. Not that anyone would,but trying it highlights the language as opposed to the IDE assistance.
I've worked on a lot of large Java projects using Eclipse and a lot of .NET projects using Visual Studio and you're right there are some features Eclipse has that are nice and Visual Studio doesn't, but that's not without it's problems.
For example, you hint at the fact that Eclipse will automatically rebuild for you, but I've found this feature particularly error prone in that it can sometimes fail to build, and like a jammed printer you have to prat around unjamming it before it will build properly again through no fault of your code (though this was the SpringToolSuite flavour, maybe the vanilla doesn't fail as badly at this). I've also found Eclipse's intellisense to be slow, sometimes too slow to be of any worth if you're a fast typer whereas I've never had that with Visual Studio. Things like code regions are much smarter in Visual Studio, it remembers properly what I have and haven't hid but Eclipse fails at this completely, you can make your document tidy by hiding rarely used regions only to have to do it all again next time you reopen the document. The theory behind Eclipse's plugin setup for supporting different frameworks and languages is nice but it almost never works requiring multiple installs for different flavours of Eclipse. Eclipse of course has a debugger but it's half-arsed compared to Visual Studios too. I think all this highlights the biggest problem I have with Eclipse - even where it does have features over and above Visual Studio they just never work well or properly and that applies to many features that it does share with Visual Studio.
But I think in general this highlights the fundamental difference between Eclipse and Visual Studio, Eclipse does have more features (though Visual Studio also has some Eclipse doesn't have) but it's a clusterfuck of everyone's favourite feature and none of it works well together. In contrast, Visual Studio may lack some of those features but at least the features it does have all work in a responsive and well integrated manner and that's why most developers who have used both prefer Visual Studio - because it's just hassle free, you basically never have to fix projects that the IDE has randomly broken, you don't have to sit waiting around for some interface element to respond, and features "just work". This is also why I prefer NetBeans to Eclipse in many cases - it follows the same philosophy as Visual Studio, less about number of features, more about making sure the features you do have work and that the IDE is fast enough to not be painful to use sometimes. Other Java IDEs like JDeveloper are even better again.
Eclipse would be best on the market if it cleaned up by making sure all features work properly, never break, and made the IDE more responsive in general, but it's had years and failed to achieve any of this - it's just added ever more features without making sure they all work well by themselves and work together with others also.
I searched that, clicked the first link, clicked download, and on the right hand side is "Community edition: FREE". I'm not sure how much clearer they could make it ...
Like what?
Change is certain; progress is not obligatory.
What part of Java design isn't braindead?
No, seriously.
I have for years tried to find a single redeeming aspect about Java. One of those: I know Java sucks but it has great "something".
Truth is, that it sucks, period. All aspects of its design are fundamentally stupid and divorced from reality.
Before Java we had Perl, just as slow and shitty, but a hell of a lot easier to write and run. But I guess it wasn't an ecosystem owned by a big corporation like Sun.
Java is just one of those overhyped corporate languages, still living off the fumes of past glory. Looking at how quickly a only marginally better language like C#/.net took over, it proves how it was more of a fad than anything else.
Nope, all of these predictions were made before trends were possible. And now the trends are real.
It's just your expectation of a short timeframe that's wrong.
HTML5 is a less shitty (but still as annoying) replacement for flash.
Just about all computer systems are moving toward Linux. Especially now, when the PC has turned into a phone in most homes.
IT is an area worked many clever people, generating scaringly accurate predictions.
Fact is, Java simply isn't a suitable replacement for programming. And that's why people think it won't last.
He was saying you don't have to cast
-Bucky
*mumble mumble* ...C# has unsigned integers...
Wait, what, why are you all pouring petrol/gasoline on me!? :'(
I also prefer C#, although I've had precious little use for unsigned types.
However, when I *have* needed them (dealing with legacy DLLs, etc) then thank god I had them.
Anyway, we better go hide in the corner before they notice us. >.>!
If you get caught, just strip all the UInt32 statements out of your code and pretend it's Java.
Nobody can tell the difference anyway.
I don't know what to say. I didn't know it existed until it was pointed out, here.
Granted, I did not proceed to the downloads pages. Why would I do that when all other indications are that it's pay-for software? I have zero interests in trials or shareware, which is what you'd expect to see.
For large sets, this will be our guide even unto death, for the LORD will work for each type of data it is applied to...
Minecraft confirms that it's not dying. Does that count?
Java or Netcraft?
I'm a good cook. I'm a fantastic eater. - Steven Brust
I would like to embrace and extend your comments, but unfortunately my conscience prevents from doing so.
I've never seen these problem in practice. UTF-16 is just fine for 2-byte characters - like UTF-8 you can sort and search and whatnot because the multi-unit encodings were done right.
No clue what you're going on about with "not text" "corrupts the rest" "no random access" and so on. I think you've mistaken UTF-16 for something else. UTF-16 and UCS-2 are the same for all valid Unicode codepoints under 0xFFFF. 0xD800-0xDFFF represent multi-unit encodings in UTF-16, and never had any valid meaning in UCS-2.
If what you're wanting is "one slot in the array = one glyph on the screen" that just will never happen - that approach only even makes sense for languages with small "alphabets", but for those languages UTF-32 will work for that. Easier to just accept that a glyph on the screen may be more than one slot in an array - that hardly ever matters in practice, other than the need to detect invalid encodings for security reasons (but most software that deals with text already cleans it up in other ways for security reasons, and this is a simple case).
Socialism: a lie told by totalitarians and believed by fools.
Watch the Crockford videos. There's at lease 8 hours of stuff you don't know or else you'd never say such silly things.
I blackholed java.com, it was all I could do to keep that damn virus from coming back. Loading it transparently is naughty.
What do I miss? Holy shit, absolutely nothing. And XP stays up for months now. Golly. It's no FreeBSD, but hey anything longer than a day and you were living on borrowed time before.
Need Mercedes parts ?
The argument about languages and side taking is for those with a black and white view of the world. The value of a language is in the context of its purpose. Java has survived so long because it is the right fit for a purpose. The hard to read argument often has nothing to do with the language, it's about programmers who write crap programs. People who don't understand OOs or knowledge of common design patterns are going to stuff it up and there is no shortage of them. That I believe is part of the education process. Go to uni, learn a language and get a brief intro to Objects Orientation and maybe learn the MVC design pattern. Go out and start writing code!!!. The language is just a tool. It's how you design your solution before you start writing code that matters. If you can do that well you don't have to invest in a specific language and get all outraged when someone makes a slight against it or try so hard to tell everyone why your language is much better than theirs. Seen too many people get all bitter because their 'chosen language' has had its moment in the sun. Move with the times, learn new languages and keep doing what I think is one of the most satisfying jobs around.
It is an astonishing, breathtaking failure when viewed with any expertise in how things should be done. You log in and the screen just turns blank with no error message. Or you get an error message that literally just says "Error!" in red and nothing more. Or it gives an error that indicates what can't be the true cause. Or it says we're too busy ... at 3 a.m. Or try again later (but not how much later). Or a bunch of Java code gets splattered onto the page in literal text. Different errrors in every variety of browser. No evidence of version control or other error tracking. No indication of status, good or bad, no list of active problems, no advice when to expect resolution. There is no documentation or explanation of any of this from the authorities or the contractor. The authorities will not report usage statistics, how many succeeded, or how anyone succeeded if there is a specimen anywhere in the universe to copy. One has to question whether it has worked in a single instance.
Here is an acid-core example: every single user has to confirm via email. Yet the email is flat-out RFC-violating non-compliant, and can't be read in email readers that don't know how to handle this non-conformity. Specifically, this violation appears in the email headers:
Received: from . . . service.govdelivery.com .
Content-Type: multipart/alternative;
. .
Content-Transfer-Encoding: base64
This is not an example of bad Java, but it does show the kind of foolishness passing for system-building everywhere you look. This garbage came from govdelivery.com who are apparently the choke point for the entire system. If they fail, or if you fail to deal with them, you are SUNK.
They do have a pretty girl smiling at you from the home page. Puh-leeze.
These are not bugs or glitches or the overwhelm of success. This thing is utterly defective. A FAILURE. One must question whether it will ever work, and if it won't have to be abandoned for a do-over. Nobody expected a smooth rollout, but this is head-slapping incompetence.
And the law is, you must succeed with it, or ELSE! You cannot mail in forms, or call on the phone, to get this done. It all happens on the Web.
And when has the federal government ever appropriated non-government technology and property in this way, and used it as the sole means to enforce something against the citizenry? With the income tax, they at least give you the paper and a post office to send it back and forth. The government will depend completely on the Internet now to keep you from being fined or put in jail?
Maybe your code is different, but have you noticed how many C functions return signed value, where -1 means error? Often same functions take unsigned size in, and then return actual size written/read/whatever. Except the maximum returned size has one bit less for positive values, than the maximum size given as argument. Do you see the problem?
As a result, lot of times an unsigned is used in C, even in standard library, a signed value should be used instead.
It's pretty unlikely the offspring would be able to randomly throw palm trees so that they'd form into working yacht to sail away from their aquamural prison.
But some chances aren't worth taking. The words "nuke" and "orbit" spring to mind.
Confucius say, "Find worm in apple - bad. Find half a worm - worse."
.Netcraft says so.
Confucius say, "Find worm in apple - bad. Find half a worm - worse."
You are very optimistic. Right now even C++ compilers (which, believe me, are very much performance-oriented and rather are not memory-constrained) have problems with producing a good vectorized code, but thanks God we have assembly intrinsics and use them a lot. For JVM, that is even harder for multiple reasons (and unfortunate - historical - choice of Java bytecode is one of them). Sure, there's a broad class of software where performance does not matter, but as I said again, that is a boring software I don't want to work on. Writing such software is better to be outsourced somewhere where people crave for money more than I do.
As for HFT, I don't think that using Java is a good decision. If you can optimize for certain (best in its class) hardware, why do you need to hop through all the extra abstraction layers of Java? Sure you probably can, but it's like artificially limiting yourself.
Coding etudes
You don't, you use gifs[1]. Can't you read?
[1] png is better, but I doubt you've heard of it.
Confucius say, "Find worm in apple - bad. Find half a worm - worse."
Oh come on. I know accents and diactritics are rare in English. But that's exactly why, when used correctly, they add a certain ambiance, a touch of the Belle Époque
You're just being faux naïve
Confucius say, "Find worm in apple - bad. Find half a worm - worse."
Sorry guys, since when is Scala a scripting language. Anything but?
Furthermore, static typing catches many errors during compilation. The sad part is that it does not catch all errors in some categories, which leads to multiple ugly results, the foremost being that developers expect the bugs caught by the compiler, hence don't test for them.
An example would be changing method arguments. Most developers expect the compiler to catch these. Sadly, a huge subset of these are not caught by compilers in most languages, e.g.:
void doit(int x, int y) => void doit(int y, int x);
Now while this sounds trivial, the underlying issue is fundamental (type theoretically spoken, type equivalence by structure), and even a developer knowing about this can be caught, as the typenames for x and y could be different (typedefs come to mind). Actually, C & C++ define a number of opaque datatypes where the developer is not expected to know what's inside. (e.g. FILE in Ansi C, guess most developers would not be able to tell by introspection if some random struct is type equivalent to FILE.)
Now the ugly part is, because unittesting is work (and static-ness does not help, it usually makes it necessary for code to be developed explicitly allowing stubbing out stuff), and because the compiler is meant to catch this category ("argument errors"), you will find that most statically typed projects do not apply the same degree of testing to the code (and especially for issues that the compiler is supposed to handle).
Dynamically typed languages do not promise any of these, hence testing usually includes also these topics that others believe to be checked by their compiler.
In the artificial benchmark world, yes you can manage to construct cases where a two liner in python can beat a C++ STL program. (Hint: C++ strings are mutable, Python one not. C++ has a strong preference for by-value semantics because it lacks GC. Hence stuff a huge multi-kb const string into a big dict, no matter what, STL map will be slower because it's forced to copy the stupid strings)
In the real world of commercial development, yes, but it's a complete different pattern:
experience shows (in at least one contract I had rather exactly the same situation), that the terser-language guys tend to be quite a bit more productive, hence while the C++ guys are happy to have finished their first iteration, the more productive guys are somewhere in their third iteration, yielding improvements in algorithms, data structures, inner-loops implemented in C, plus generally speaking a way better understanding of the problem space.
What is "system-level programming"? Is the graphics system written in Java? Of course not; it's C++. SMS application? That's in Java; it's an application. Dialer application? Java, it's an application.
Unless you want to start expanding "System level programming" to include "Web browsers and e-mail applications", Android's system is not in Java.
That is your argument or the argument of an idiot whom you follow.
This was the argument made:
Great idea! Let's implement everything on our phone in an incredibly slow, dynamically typed language, whose only relevant implementation has a GIL and a pathetically bad concurrency model!
I could argue about whether he's flat wrong about Python being slow or having bad concurrency; or I could cite that Google wrote their own JVM.
Why? Because you can not define typesafe the interfaces in Python to:
-- the address book
-- the calendar
-- the text message system
If you try to do this in python:
apple = "apple"
apple = 5
Python throws an error because "apple" is of type "string". Python is strongly typed, but it's dynamically typed: once you define a variable, it gets an unchanging type. Assigning another type to that variable is not allowed.
class AddressBook:
name = str("")
phonenumber = int(0)
Create a class as so and your class is type-strong. Not to mention Python has a robust implementation of C and C++ binding in both directions, so you can bind C++ APIs to Python in a type-safe manner. Still, the Address Book and Calendar and such are likely written in Java, and thus in our thought experiment would be in Python; you would define the classes to carry certain types of data directly in Python, not bind to a back-end C library.
Support my political activism on Patreon.
The android platform is a linux kernel written in C.
On top of that are systems that are necessary to run a phone. And bet those are not all written in C.
I consider interacting with the "platform" like sending an SMS system level programming. And much of that is written in Java. But perhaps you are right and it is more application level programming.
Regarding your python examples, I know that. But how good is it to have such an exception on a running application on a phone instead of a compile time error?
You can describe an interface in Python, but you an not enforce correct usage.
Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
Java IS dead... just like rock and roll.
Ah, so the issue isn't that there isn't strong typing; it's that the compiler for a C or Java app runs through the code and cross-verifies types, while in Python you don't have a static checker. Python's duck-typing makes it difficult to write a static checker, and so you would get only limited success: You'd have to follow each possible branch and determine if a value could get initialized to something else, and raise an error on an absolute yes.
In other words: your argument is that any language with duck typing is inherently wrong for any application that people are expected to use.
Support my political activism on Patreon.
In other words: your argument is that any language with duck typing is inherently wrong for any application that people are expected to use.
No that is not my argument.
My argument was as before: in a static typed language you can define interfaces to other parts of the system. And enforce the correct usage.
In languages like Python you can only describe interfaces (which means you require the human to read carefully) but can not make sure they are used correctly.
That means it is easy to deploy an application on a phone which fails later to runtime errors due to interacting with other apps/services etc.
There are plenty successful examples where duck typed languages where used. I'm fully aware of that.
Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
Duck-typing is a special type of dynamic typing. It's inherently not static typing.
Support my political activism on Patreon.
Sigh, everyone knows that, so is the rest of your post missing or what is your point? Or well, you are only half right, ofc it is not static, but all dynamic typing systems that use dynamic message dispatch are duck typed. Duck typing is only a lay mans term to use that stupid saying: "does it walk like a duck ... etc."
The only dynamic typing systems that are not "duck typed" are languages like perl.
Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
Your argument was that static typing is necessary to create a language with restrictions which prevent misuse of interfaces. That means inheritable typing (i.e. class inheritance, where you define and explicitly use a class or its descendents which inherit its interface), but not duck typing (i.e. where you shove something at it, and as long as it reacts in a meaningful and appropriate way to the same way to the same member calls and provides the same attributes and other interfaces then it's correct).
Duck typing is a piece of technical jargon; it's not a lay-term. Duck typing is a term similar to "Floating Point Unit" and dissimilar from "Math coprocessor" (which is still kind of jargony but eh).
In any case, you seem to be arguing that the specific set of code verification afforded by a specific subset of static checking (that being compile-time checking) is required for code quality reasons, without accepting any other form of verification.
To take this down to a risk management level, you're attempting to partially mitigate the risk of improper type usage with standard interfaces (a subset of "bad code" risk) in high-importance applications (SMS application, e-mail application, Contacts, etc.) by using compile-time type checking with a statically typed language. I believe you're over-estimating the risk, as your risk domain is limited to core applications and interfaces which are subject to extra scrutiny including extensive testing and code verification. The resources expended on these applications are high enough that creating and using a static checker and taking up coding practices to enable higher accuracy from the static checker in high-importance code paths would be a reasonable additional expenditure (remember, they did write their own JVM for the Android system), allowing for further mitigation if desired.
These risk considerations are interesting because you can consider the accessibility of Python as a risk: Python is easy to code in, and easy to debug, and easily portable; this could have marketing impacts or code quality impacts (i.e. if code written in Python by equally skilled parties expending equal resources is more likely to have fewer defects than code written in Java, then Python has lower code quality risk; this is a primary argument against C and C++, with many considering these languages magnets for bugs and feeling that similar skill will produce more defect-free Java or C# or Python code than C or C++ code).
As a final note: I can convert most strategic arguments (like the decision between which language to use) into risk evaluation; I can't necessarily evaluate that risk, as it requires expert judgment. The evaluation of Python versus Java would require not only a deep understanding of each language, but also of the use of each language: knowledge of strengths and weaknesses in complex programming tasks equivalent to the tasks undertaken in the target environment are required, as well as practical comparisons of defect rate both for similarly skilled programmers and in general (because i.e. maybe Python produces fewer bugs from decent Python programmers; but maybe there's more Java programmers at a reasonable level, and so most programmers would be Python n00bs that write shitty Python code). Further, mitigation may be possible with additional effort, as I've pointed out with the potential to use and even directly accommodate static checkers; this definitely affects risk.
(I can convert most technical and strategic arguments and decisions into a variety of things--strategic evaluation is something I have a lot of tools for; it helps to examine stuff from every angle you can.)
Support my political activism on Patreon.
C not C++
char myChar;
You can argue that this is actually an integer. But under everything, all information is stored as some form of number. So if you really want to be anal or dogmatic or both, you can't any store data type only binary numbers (unless you have a quantum computer I guess).
-- I ignore anonymous replies to my comments and postings.
This is a double edged sword.
-- I ignore anonymous replies to my comments and postings.
Duck Typing is a relatively new term, mainly coming from the groovy community or lets say it appeared at the time when groovy appeared and raised with it.
Sorry, you seem not to understand what an interface is or what a system description is.
BTW: I wonder which python version or special flags you use that: // error here? ... yields an runtime error? That is not standard behaviour.
a = "string";
a = 7334;
Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
It was a confusing error for me, as I had just learned Python and wondered why it wouldn't accept being given a new value. Turned out I was assigning an Int type from a String type without int() casting. CPython 2.5 on CentOS.
New term still counts as technical jargon. Remember when "Graphics Processing Unit" was a new, groovy layman's term when "video card" and "video chipset" had fallen out of style?
Support my political activism on Patreon.
Thank you for your reply. If you look at my message which you replied to, I also said that strong typing enables 'toolability' of the language. I then gave only the most simplistic type of toolability -- intellisense.
Eclipse, which is an IDE for writing code, has lots of toolability features for Java. For example, of your doit( int x, int y) method. In Eclipse, you would click in the word doit before the open paren, right-click, Refactor, Change Method Signature...
(dialog box appears)
The dialog shows a table with all of the method formal arguments. Click a row, such as the row for X, and then click the DOWN button to move that row down below Y, then click OK. Not only will the two arguments X and Y be interchanged in the signature of method doit, but all references in your code will also be changed as well.
This is not done by some simplistic search and replace. Eclipse has a deep understanding of your source code. The editor is deeply integrated with the compiler. Or rather, to put it in simple terms, the Java compiler is a very large library and the compiler command line tool is just a wrapper around the large amount of compiler logic in a library. The Java editor in Eclipse makes extensive use of the library functions in the compiler to deeply understand the source code and have a database about everything in all of your source code in your entire project.
Another example, in a large method, select several lines, refactor, extract method. A dialog appears. You give the new method a name, the dialog tells you what the arguments are, but gives you an opportunity to rename them, then when you click OK, the lines you selected are refactored out into a separate method, and the place where those lines were becomes a function call to that method.
There are many other refactoring tools. This kind of toolability is enabled because the language is statically typed and the editor understands exactly what else in your project is related to what. There is no compile time (or editing time) doubt about what method a particular function call would go to.
In dynamically typed languages, this can be difficult to impossible to do. In languages like, let's say Javascript, it can be impossible. You could have a reference like x["foo"] = bar, which could also have been s="foo"; x[s] = bar. Both of these are equivalent to x.foo = bar. Now if I did some refactoring, such as a rename to change x.foo into x.frob, should you or should you not rewrite other code to say: s="frob"; x[s] = bar? This has a certain similarity to how in C an array reference and pointer could be interchanged and refactoring tools might not recognize subtle tricks.
As to the other part of your reply, static typing promises to catch exactly what it catches. No more, no less. Interchanging arguments is something you do with refactoring tools. Especially in a gigantic program. You never interchange function arguments by hand. Heck, you don't even reverse the then-else conditions of an if statement by hand -- you right click and refactor. The tools will reverse the logical condition in the if condition for you as well as reversing the then-else blocks.
Like all good things, these great tools (eg Eclipse) are free and open source.
I'll see your senator, and I'll raise you two judges.
No amount of criticism is going to make Java go away so get over it and stop flaming about Java being _______________. I am going to go out on a limb here and state categorically that each and every programming language has its faults. So your choice is simple: either declare that "the glass is half-fiull" or "the glass is half-empty". IMHO Java is an incredibly fantastic language to use for accomplishing your task at hand. Yes, you need to type a little bit more in Java. Shut up and get to work is what your managers are going to say.
--- You are in a little twisty maze of comments, all different.
Are you retarded? It's on the fucking download page for IDEA. The guy even gave you a link to take you straight there.
Are agnostics skeptical of unicorns too?