### Im learning java, do they have a forum as simple and easy going as this one

Pages: 1... 5678
rapidcoder wrote:
To objectively compare algorithms performance despite different constant factors.
I don't see "compare languages performance".

And thanks for some solid numbers, I'll have to look these over and figure out what they mean.
L B wrote:

Some languages (Haskell for example) allow lists to be of infinite size. The simplest one is probably `[0..]` which evaluates to the set of non-negative integers. It works because of lazy evaluation. The language figures out what the next element is algorithmically and only when it's actually being used, so it never has to store the entire list in memory (which would obviously be impossible with a finite amount of memory). You can then do simple operations like `take 5 [0..]` which returns the set `[0, 1, 2, 3, 4]`, `[0..] !! 1000000` which returns 1000000, `head [0..]` which returns 0 and `tail [0..]` which returns the set of positive integers (which is another infinite set).
Last edited on
I see, I think I am understanding what rapidcoder is saying. But what I am understanding scares me - lazy enumeration, right?. I can't possibly think of a good reason for it with the example code above, though obviously mathematically it is very useful.
I don't see how lazy evaluation would help with this example, but that filtering operation would be extremely easy in Haskell. It has a function called filter built right in.

In fact, here's that C# code implemented in Haskell:
 ``12`` ``````customerQuery = filter (\x -> (x !! 2) == "London") customers mapM (\x -> putStrLn ((x !! 0) ++ ", " ++ (x !! 1))) customerQuery``````

[edit 2]
where the customers list would look like this:
`customers = [["Doe", "John", "London"], ["Doe", "Jane", "Madrid"], ["Parker", "Peter", "New York"], ["Cthulhu", "", "R'lyeh"]]`
Last edited on
Lazy evaluation offers an interesting optimization opportunity: if you apply several transformations to a sequence, and then force a calculation, everything is done in a single pass. Kind of like how C++ does it with expression templates and valarrays.
 C# LINQ version is nice from the user's perspective, but the downside of it is it complicates the syntax

hmmm, what? really? I found it really easy to use.

Also C++ can use LINQ. as LINQ is a library part of .NET

but the main use for it is not to interact with objects. but to interact with other forms of data. such as LINQtoXML, LINQtoSQL or LINQtoExcel. As far as I know, Java does not have an easy access library like LINQ to do this. Not without jumping hoops anyways.

I like C++ way of handling things as well as C#. But I find Java to be like C# 2.0 with is a few generations behind. considering we are at C# 5. C++ and C# work well together in my experience so far.
 As far as I know, Java does not have an easy access library like LINQ to do this.

That's right, because it can't be done well (not because Java, but because the idea that all so different data sources can be handled by one specialized language is ridiculous). E.g. LINQ to SQL - I doubt it plays well with non MS databases.

Anyway LINQ to SQL has been discontinued.

 But I find Java to be like C# 2.0 with is a few generations behind

Let's take some basic feature. Can you make final fields in your C# classes? Last time I checked (C# 3.5) you couldn't. Readonly is much weaker. Or anonymous classes. I guess they were added in C# 3.5 and Java has had them since version 1.

There are plenty of features java has, that C# does not:
* low pause / pauseless GCs: CMS / G1 / C4
* server HotSpot compiler (CLR cannot do many optimisations JVM does)
* huge amounts of third-party libraries, e.g. ASF libraries
* great concurrency libraries
* awesome IDEs (I have for free in Eclipse what you need to pay for in e.g. Resharper)
* first-class support for Linux, Unixes including Mac OS X

The only big feature that C# has had and Java hasn't were lambdas and delegates. But that is no longer true.
Last edited on
What's wrong with readonly? And C# has got const which is evaluated at compile-time (whereas readonly is evaluated at runtime).
 That's right, because it can't be done well (not because Java, but because the idea that all so different data sources can be handled by one specialized language is ridiculous). E.g. LINQ to SQL - I doubt it plays well with non MS databases.

Works like a charm, saves tons of time and many big corporations uses it. I did a Freight Calculator for my current employment using LINQtoExcel and it works great. Freight companies rates were on the Excel sheets and it reads it fine.

 The only big feature that C# has had and Java hasn't were lambdas and delegates. But that is no longer true.

Please become familiar with all of the features of .Net 4 and .Net 4.5 before you state this. There's a good reason why C++ and C# are the 2 most used languages.

 * first-class support for Linux, Unixes including Mac OS X

Except the fact that 90% of the desktop consumer market uses Windows. usually it is good to adhere to the higher demand for any serious software or game development.
C# supports Linux and OS X as well via Mono/Xamarin.
 Except the fact that 90% of the desktop consumer market uses Windows

The problem is desktop is already a niche market. It might be popular by # of computers, but there is little money there compared to other markets like mobile or webapps. Try to submit an idea to some startup hub like YCombinator and let it be a desktop app. They will laugh at you.

Good 70% of mobile is Android which is Java. Mobile is growing market, desktop is shrinking market.

Good 80% of serverside software is Java (and PHP for smaller ones). All the bigs corpos like Apple, Netflix, Facebook etc use Java for powering their server stacks. Java Hadoop is a defacto standard now for crunchinng big-data.

 Please become familiar with all of the features of .Net 4 and .Net 4.5 before you state this. There's a good reason why C++ and C# are the 2 most used languages.

Source link or it didn't happen. Job demand in USA for C++ and C# is much, much lower than for Java, according to indeed.com. Salary averages are the same.

Let's see some rankings:

https://github.com/languages
Java 3rd, C++, 8th place, C# is not even in the first 10.

http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html
Java 1st, C++ 4th, C# 5th.

http://www.langpop.com/
Java 2nd, C++ 3rd, C# 6th

According to RedMonk, Java is also ahead of C++ and C#.

So really, where did you get your knowledge that C# is so widely used?

 Works like a charm, saves tons of time and many big corporations uses it. I did a Freight Calculator for my current employment using LINQtoExcel and it works great. Freight companies rates were on the Excel sheets and it reads it fine.

What works for you like a charm in your toy projects might not work in a projects of size like eBay. Got it? That's why MS discontinued it. LINQ to SQL was a toy compared to e.g. Hibernate (NHibernate). Easier to use, but less flexible and performant.
Last edited on
I didn't see that rapidcoder had edited the last post on page 6.
rapidcoder wrote:
Which means, whenever you iterate it, it applies the filter to the original collection. Therefore no data need ever be copied.
But what if I insert data at a point before where the iterator is at?
rapidcoder wrote:
Therefore no data need ever be copied.
In the C++ example, data didn't 'need' to be copied, we could just create a special iterator of the original, but it would be absurd because there would be no reason to account for the data in the original to change during iteration; it is far safer to just grab and go.
Last edited on
Java is widely used over C++ and both over C# is because Java apps or games will run on any system after installing the Java runtime. While C++ would require OS specific libraries or cross platform libraries to link against to make it work. While C# kind of locks you into Windows dev (PC, Windows Phone, 360) and possibly on *nix depending on how well Mono works as I've heard it still is questionable in several aspects. Though I could be completely wrong as I've not touched Microsoft or Mono in years.
 According to RedMonk, Java is also ahead of C++ and C#.

Right RedMonk… They list Ruby in the top ones… I live in a city with hundreds of software firms some big ones like Sage and EA Games. And out of hundred job listing, I think you’re lucky if you find one that asks for Ruby. Also Javascript is a script language that you use with C#, Java, etc. So it should not be in the same list. That makes no logical sense.

When I mention the most used language or the higher consumer market, I go about what brings the most economic value. Software used by corporations for their accounting, for their airplanes, for their traffic lights, for their tanks and so forth, is mostly done with C++ and some with C#… Games actually are the biggest financial software market, and most of them are still done with C++. Game apps made with Java for Smartphones is nothing compared to the multi-billion Console and desktop game industry. Aswell, there are more cars then there are Smartphones and car chips are not made with Java. The most used softwares and OS at work places are still Windows XP, Microsoft Office and Simply accounting. Most PoS systems and industrial softwares are also all coded with either C++ of C#... mostly C++ actually. And though an app sells for \$2 to \$3 each, some PoS systems sell for \$80,000.

People have a real misconception when it comes to the software industry; They forget that even their coffee machine has a chip in it, and that chip was more likely made with C, C++ or ASM.

 The problem is desktop is already a niche market

Smartphones are not replacing desktop/laptops. They are widely used, but when the average person goes to work they use a desktop/laptop, when they get home from work, same thing; desktop/laptop. Most used operating system:
http://en.wikipedia.org/wiki/Usage_share_of_operating_systems
that’s current 2013.

 Good 70% of mobile is Android which is Java.

Android OS was coded with mostly C / C++
Many Android apps are done with C# using Mono.

http://en.wikipedia.org/wiki/Comparison_of_C_Sharp_and_Java
there is a lot C# can do that Java cant.

Anyways, this is a pointless argument. People can love whatever language they want. But this is after all a C++ forum, which means it will get stronger support for C++. In my past searches I’ve always found way more jobs that asks for C++ , C#, PHP and python. But that’s does not mean you can’t make it with Java. I just personally dislike Java, as well as Apple.
Last edited on
 Software used by corporations for their accounting, for their airplanes, for their traffic lights, for their tanks and so forth, is mostly done with C++ and some with C#…

Accounting - it was true in 90s, now it is legacy software; new soft is made mostly in Java, sometimes C#; Java took the financial market somehere in the end of 90s - currently for every single C++ job offer in a bank or insurance company, there are 3-5 offers for a Java coder.

Airplanes - Ada, C and probably some other specialized things, I doubt they use C++ there (it would be too risky)

PoS systems - I saw Flex there, Java Swing, C++ and many others

Car chips - pure C. C++ in embedded is not C++ really, it is mostly C with classes.

TV sets: Java.
BlueRay players: Java
SmartCards: Java
Scalable Databases: Java (C# nonexistent here)

 Game apps made with Java for Smartphones is nothing compared to the multi-billion Console and desktop game industry.

Wrong. A single stupid mobile/web game made Zynga worth more than EA at some time. Java for Smartphones is a multi-billion game industry, too. A single game may be lower budget, but there are simply more of them. Judging the size of the market by a few top selling AAA games is wrong.

Anyway, this discussion doesn't lead to anything because all your arguments are from personal experience (=biased). I quoted some sites with statistics based on various different metrics and in none of them C++ and C# were before Java. I also qoted job offer data. Job offers is the probably best metric saying which language is being currently used. Demand for Java coders is 3-5 times higher than for C++ coders and 2x higher than for Java coders. And this is true both for US market and Europe. I don't care about India or China, but probably demand for Java coders is even higher there.

 Android OS was coded with mostly C / C++

So go and find a job as Android OS developer at Google. Good luck. How many openings are there for this position worldwide do you think? 5? 7? 10 if they have a good year. And Google is not paying much more than banks in Switzerland are paying Java coders for crunching big data.
 So go and find a job as Android OS developer at Google

Why would I want to do that? I already have a good job :p
This is fun

rapidcoder wrote:
I doubt they use C++ there (it would be too risky)
rapidcoder wrote:
your arguments are from personal experience

So your fantasies are better arguments than someone's actual personal experience?
Oh, c'mon, Cubbi. He's collected contextless data from many online job sites and made all sorts of assumptions about said data. Surely that's worth more than personal experience.

rapidcoder wrote:
pure C. C++ in embedded is not C++ really, it is mostly C with classes.

And he's funny!
Last edited on
Data is more valuable than experience because experience is tainted by personal bias. This is why scientists do empirical studies instead of just writing down what they see.
closed account (3qX21hU5)
Is gaming software really the biggest software market? I really find that hard to believe.
Pages: 1... 5678