Future of C#

J

Jon Skeet [C# MVP]

Jon Harrop said:
There's no point in speculating without any quantitative evidence.

You've not been reticent to speculate in the past.
Particularly if you are totally unaware of ML.

I'm not "totally unaware of ML". Why do you suppose I am?
Sure:

Windows once had an appalling reputation for being plagued by crippling
bugs. Microsoft did not even know where these bugs were in their operating
system. A team led by Gordon Mangione pioneered the use of automated error
throwback to Microsoft and discovered that 80% of the bugs were actually in
third-party driver code.

As a consequence, Microsoft stopped pouring money into hundreds of testers
trying to maintain their low-level code and built a group to perform static
verification of drivers using tools written in OCaml. They succeeded in
removing many of the most important bugs and the reliability of the whole
platform improved enormously as a consequence.

How many developers were displaced by the ML developer and how what is the
monetary value of stability to Microsoft?

That's a single point of data, about a single area (bug detection).
Yes, it's an important area in a large system, but it can't be assumed
to be representative of computing as a whole.
My job wouldn't exist if my statement weren't true.

Your job wouldn't exist if there weren't people who believe your
statement is true. Big difference.
What use?

Um, not sure what you mean. By the common definition of "widespread"
the information about how many C# developers there are vs how many ML
developers there are is indicative of the overall comparison.
Better than standing outside the C# party, making myself extra visible and
acting as a high-class spammer for scraps. Apparently MVPs are legal in
Australia. ;-)

I have absolutely no idea what you're referring to.
Actually I introduced Sudoku and calculus to this conversation to illustrate
the difference between common and valuable.

That certainly wasn't clear at the time.
On the contrary, I think calculus is widespread and valuable but Sudoku is
common but domain specific.

I'd agree that calculus is widespread and valuable, but I'd say that
Sudoku is *more* widespread.
Sure. XenSource do that and its written in C#. Well, the intermediate
language is C#. It is actually generated by OCaml code. ;-)

You seem to be completely ignoring my point.
You've changed your tune. You don't want to compare languages my monetary
value but you want to compare games by subsidy rather than units sold.

I'd be happy to compare languages by monetary value, but I suspect
you'll find that pretty tricky. However, if you're going to claim that
Java is unquestionably a dominant force in games programming, I'd
expect at least one very popular game to be primarily developed in
Java, wouldn't you?

Perhaps you could elaborate on how you believe it's such a dominant
force.
Try using the complex number implementation from the F# stdlib in C#, or the
Extreme Optimization library's C# API from F#.

Why don't you just save us the effort of investigating the libraries,
and explain how it's relevant to my point. How is F# (which runs on
..NET, right?) going to get round the "scientific computing is very
often not running on Windows" issue, for instance?
 
E

Enkidu

Jon said:
. I'd like to break down market size (in $) by programming language.
My survey shows the following:

C# 5%
C++ 1.5%
GWBasic 93%
Other 05%

Hope that helps

Cheers,

Cliff
 
J

Jon Harrop

Enkidu said:
My survey shows the following:

C# 5%
C++ 1.5%
GWBasic 93%
Other 05%

Fascinating, thank you. :)

I get:

OCaml: 80%
F#: 11%
C#: 2.4%
Mathematica 6.6%

Where is GWBasic available from?
 
J

Jon Harrop

Marc said:
I'm not in the least bit convinced (and you have provided no
justification) that this is in any way related to language (or
framework) choice. Can I submit that this is more related to those
areas in which ML (or functional programming in general) is suited,
being lucrative. Well, I am genuinely happy for you that you have such
a niche, but this doesn't compare the tools used. The only way you
could do this would be to swap the positions; I submit that C#, as a
general purpose language, would be more than acceptable (perhaps with
a mathlib reference) in science usage (or whatever) - heck, I've done
a range of such things, involving ant-colony, TSP, network
optimisation, etc; However, due to specialisation, would ML genuinely
fare so well in business usage? I somewhat doubt it. It can be forced
to do the job, but is that really a good idea?

Everything you can do in C# is either the same or easier in F#. So I think
it is pretty clear cut in that case.

For other MLs like OCaml, your point may be valid. However, I'm not sure
what sorts of libraries you would need. XenSource needed more networking
libraries than were available in OCaml, for example, so they wrote several
of their own.
Try using the complex number implementation from the F# stdlib in C#, or
the Extreme Optimization library's C# API from F#.

I haven't done so, but I assume from your reply (in context) that this
would be messy / hard [assertion: if incorrect, please say]?
Yes.

In which case, can I submit that the F# stdlib is poorly designed from
a .NET perspective?

In order for F# to be more expressive than C#, its stdlib must break the
limitations of being an ordinary .NET library.
The entire idea of CLR is to be commonly usable.

Well, the CLR provides a type safe interface between languages with an
unusually sophisticated notion of "type". That provides unparallelled
interoperability between libraries written in different languages. However,
using a conventional .NET library imposes design decisions upon the rest of
your code.

For example, WPF and XNA are both much harder to use from F# than they need
to be. Compare simple programs in those with the equivalent from a real
functional language (with its own libraries) to see what I mean:

http://www.ffconsultancy.com/products/ocaml_for_scientists/visualisation/
http://www.ffconsultancy.com/products/smoke_vector_graphics/
http://www.ffconsultancy.com/ocaml/bunny/

That's why our F# for Visualization product starts from scratch (building
upon the codebase of an established OCaml product, Smoke Vector Graphics).
Likewise, if F# can't neatly consume the Extreme Optimization
assembly, then *again* I submit that the fault is with F# for failing
to properly observe CLR concepts.

Extreme Optimization is as easy to use from F# as it is from C# but a native
F# interface would be much easier to use still.
This would be a *major* stumbling
block in proposing F# as a common-usage .NET langauge, as comsuming
libraries is very common.

You could have said the same thing when C++ was born: "having libraries in C
is a major stumbling block in proposing C++ as a common-usage language as
consuming libraries is very common". Of course, any language that catches
on (as C++ did) ends up reimplementing everything natively. That is already
happening with F#.
 
J

Jon Skeet [C# MVP]

Jon Harrop said:
Everything you can do in C# is either the same or easier in F#. So I think
it is pretty clear cut in that case.

The fact that you take the first statement as read is the problem.
While you continue to assume that without presenting evidence, I can't
see how this is going to be a constructive discussion.

I'm bowing out... this discussion is a waste of time, I suspect.
 
M

Marc Gravell

Everything you can do in C# is either the same or easier in F#.

You simply have not supported this at all. You have just given some
examples (in the F# sweet-spot), but this does not support the
"everything you can do" argument. I will happily accept that it would
be possible for a highly targetted language to address a specific
problem better than a general purpose language (possibly such as F#
with your examples) - but that simply isn't a common problem *to the
majority of developers*. It is my suspicion that you are so deep in
the niche that you cannot accept that the niche exists. Sorry, but IMO
F# will always be a minority language - perhaps highly valuable in a
few areas, but (going back to your original post) making no impact on
the typical developer who simply has other things to do.
You could have said the same thing when C++ was born: "having libraries in C
is a major stumbling block in proposing C++
...
any language that catches
on (as C++ did) ends up reimplementing everything natively. That is already
happening with F#.

That is the exact *opposite* intent of the CLR. Rather than spending
time and money trying to bring ML into .NET, don't you think the
overall community would have been better off by extending CLR
libraries with similar functionality? In particular, 3.5 lambda
expressions seem quite similar in syntax, so may have been a good
starting point.
Picking an exampe at random, the point being, I don't need to look for
"AJAX for C#" - just "AJAX for .NET". I don't care what language the
assembly was written in. The only thing language specific is the code
samples. If F# does things differently, it will have a major
difficulty getting converts. OK, each CLR compiler might provide a few
small nicities (anonymous methods, a LINQ compiler, late-binding
(VB.NET) etc), but these are just wrappers around framework calls,
that can be used from any CLR language.

[JS]> this discussion is a waste of time, I suspect.
Seconded. Sorry Jon (H), but I don't think you're convincing anyone.
 
J

Jon Harrop

Marc said:
You simply have not supported this at all.

F# simply takes the capabilities of C# and adds functional programming,
pattern matching, type inference and a variety of other features. So this
is a no-brainer.
You have just given some examples (in the F# sweet-spot), but this does
not support the "everything you can do" argument.

The examples I've given were designed to showcase the new features offered
by F#. Everything else is the same as C#.
I will happily accept that it would
be possible for a highly targetted language to address a specific
problem better than a general purpose language (possibly such as F#
with your examples) - but that simply isn't a common problem *to the
majority of developers*. It is my suspicion that you are so deep in
the niche that you cannot accept that the niche exists.

Then I am also "deep in the niche" that OOP improves upon procedural
programming.
Sorry, but IMO
F# will always be a minority language - perhaps highly valuable in a
few areas, but (going back to your original post) making no impact on
the typical developer who simply has other things to do.

The same can be said of C#, of course.
That is the exact *opposite* intent of the CLR.

Yes. This progression is inevitable. At the core of the CLR is an inherently
mutating OOP style that is ill suited to the future landscape of computing
(most notably concurrent programming). While future developments are made
much easier by leveraging the CLR now, they will make progressively less
use of its OOP features as people migrate to better paradigms in the
future. The front-ends of the compilers for these languages will grow to be
much more sophisticated (just as F# is compared to C#). Eventually, a next
generation CLR will be created that has a wildly different style at its
core, one that can handle the massive parallelism of the future and expose
higher-level constructs (like closures) between languages.
Rather than spending
time and money trying to bring ML into .NET, don't you think the
overall community would have been better off by extending CLR
libraries with similar functionality?

In essence, you cannot retrofit functional programming onto and OOP system
as a library in a usable way just as you could not retrofit OOP onto
procedural programming as a library.

The CLR was extended with IL extensions (ILX) for some core functional
features like tail calls (which the JVM still lacks) but functional
programming is largely about what the programmer sees.

OOP makes it easy to extend types but hard to extend functions. Functional
programming makes it easy to extend functions but harder to extend types.
Both approaches have relative merits but, when they have the choice,
programmers generally find functional programming more useful than OOP
(objects are rarely used in OCaml and self-contained F#, for example).

F# also adds a variety of other language features like pattern matching,
which is a vastly better way to manipulate trees including XML data. These
benefits are widely appreciated because XSLT provides pattern matching
specifically for XML data, but F#'s pattern matching can be applied to any
data and is arbitrarily extensible.
Picking an exampe at random, the point being, I don't need to look for
"AJAX for C#" - just "AJAX for .NET". I don't care what language the
assembly was written in. The only thing language specific is the code
samples. If F# does things differently, it will have a major
difficulty getting converts.

I must have misled you. F# provides the same seamless interoperability with
existing .NET libraries that C# does. So an AJAX for .NET will work
perfectly with F# just as it does with C#.

The point I was trying to convey is that many applications in parsing, XML,
graphics and so forth stand to benefit enormously from the features
provided by F# but you can only get APIs written using these higher-level
constructs by sitting down and writing the interface yourself.
OK, each CLR compiler might provide a few
small nicities (anonymous methods, a LINQ compiler, late-binding
(VB.NET) etc), but these are just wrappers around framework calls,
that can be used from any CLR language.
Yes.

[JS]> this discussion is a waste of time, I suspect.
Seconded. Sorry Jon (H), but I don't think you're convincing anyone.

If you are genuinely interested in learning about what other paradigms have
to offer and when they are preferable then I can direct you at more
information.

Suffice to say, Microsoft will be inundating everyone here with such
information in the near future.
 
J

Jon Harrop

Jon said:
While you continue to assume that without presenting evidence...

That was not an assumption, it is the purpose of Microsoft's next major
language.
 
?

=?ISO-8859-1?Q?Arne_Vajh=F8j?=

Jon said:
That was not an assumption, it is the purpose of Microsoft's next major
language.

Which is ?

My assumption is that C# will be the major language for MS for
10-20 years to come.

Arne
 
?

=?ISO-8859-1?Q?Arne_Vajh=F8j?=

Jon said:
The same can be said of C#, of course.

Except that the typical developer can code in C# but not in ML.
Yes. This progression is inevitable. At the core of the CLR is an inherently
mutating OOP style that is ill suited to the future landscape of computing
(most notably concurrent programming).

Guess what - people don't seem to have a problem writing concurrent
apps in C#.

Arne
 
C

Chris Mullins [MVP - C#]

Jon Harrop said:
Yes. This progression is inevitable. At the core of the CLR is an
inherently
mutating OOP style that is ill suited to the future landscape of computing
(most notably concurrent programming). While future developments are made
much easier by leveraging the CLR now, they will make progressively less
use of its OOP features as people migrate to better paradigms in the
future.

Nobody really seems to have a solid handle on where Concurrent Programming
is going to end up.

Transactional Memory seems a likley candidate, as do the various Port Based
implementions that are cropping up. Likewise, a case could be made for
technologies like PLINQ, or some of the related variations.

I'm really not sure how the "inheritenly concurrent" languages do (ERLang,
etc), or how they do it, but from what I read there seems to be little
concensus at this point as to the direction the future of concurrent
programming is headed...

Until then, it's impossible to say that the CLR is unsuited to what's
coming....
 
J

Jon Harrop

Arne said:
My assumption is that C# will be the major language for MS for
10-20 years to come.

Then why did they develop a common language run-time and start pushing
IronPython and F#?
 
J

Jon Harrop

Arne said:
Except that the typical developer can code in C# but not in ML.

You mean the typical developer should be familiar with C++ or Java and,
therefore, should be able to pick up C# quickly?
Guess what - people don't seem to have a problem writing concurrent
apps in C#.

Writing concurrent apps that are correct and fast, on the other hand, is
hard.
 
?

=?ISO-8859-1?Q?Arne_Vajh=F8j?=

Jon said:
Then why did they develop a common language run-time and start pushing
IronPython and F#?

Primarily to support the #2 language (VB.NET) and the #3 language (C++).

J#, JScript.NET, L#, F#, IronPython, IronRuby etc. are more "for fun".

Arne
 
?

=?ISO-8859-1?Q?Arne_Vajh=F8j?=

Jon said:
You mean the typical developer should be familiar with C++ or Java and,
therefore, should be able to pick up C# quickly?

No - I mean that they actually know C#.
Writing concurrent apps that are correct and fast, on the other hand, is
hard.

I don't think so.

It is relative rare that we see concurrency issues in C# code.

Arne
 
J

Jon Harrop

Arne said:
No - I mean that they actually know C#.

Well, C# has clearly only gained traction in a very specialized area and,
even there, it is not dominant.

For example, the following Google hits indicate that, outside XML- or
SQL-related programming, less than 4% of programmers know C#:

"C programming" -xml -sql: 1,650k
"Java programming" -xml -sql: 1,610k
"C++ programming" -xml -sql: 1,290k
"Perl programming" -xml -sql: 474k
"Python programming" -xml -sql: 385k
"Ruby programming" -xml -sql: 298k
"D programming" -xml -sql: 286k
"C# programming" -xml -sql: 246k

I'm quite surprised to see that a language designed and implemented by a
single person (D, by Walter Bright) has managed to gain more traction that
Microsoft's flagship language but there you go.

Anyway, I would not say that many programmers know C#. As I said, I don't
know any C# programmers personally (outside Microsoft employees, of
course).
It is relative rare that we see concurrency issues in C# code.

Ok, I'm surprised to hear anyone say that. The technologies usually hailed
for concurrent programming (e.g. Erlang) have vastly more sophisticated
support for concurrency built into the language. In contrast, C# provides
almost nothing over and above the OS in this respect. No monads, no agents,
no actors, nothing. Indeed, even Windows forms fails to provide thread-safe
access.
 
L

Lew

Jon said:
For example, the following Google hits indicate that, outside XML- or
SQL-related programming, less than 4% of programmers know C#:

"C programming" -xml -sql: 1,650k
"Java programming" -xml -sql: 1,610k
"C++ programming" -xml -sql: 1,290k
"Perl programming" -xml -sql: 474k
"Python programming" -xml -sql: 385k
"Ruby programming" -xml -sql: 298k
"D programming" -xml -sql: 286k
"C# programming" -xml -sql: 246k

What exactly are you measuring here, and exactly how does it indicate how many
programmers there are, much less how many know each language? I note that you
have not labeled the columns of your little table, so there is no way to
interpret it.

Are you suggesting that there are 1.65 x 10e6 programmers who know C?

Have you factored out programmers who know more than one language? For
example, I am conversant with FORTRAN, C, C++, C#, Java, a few flavors of
assembler, Javascript, several dialects of BASIC, SQL, xBase. Algol, Pascal,
and a teensy-tiny bit of FORTH, LISP and Prolog. At that, I consider myself
somewhat less language-fluent than many programmers.

Where is FORTRAN in your chart, for God's sake?

Why did you leave F# off that list? Javascript? PHP?

Why do you consider XML a programming language? It's a markup language.

The commercially viable programming languages right now are led by BASIC, SQL,
C, C++, C#, Java and COBOL in the desktop and enterprise world; add Perl and
PHP to that for Web crap.
 
J

Jon Harrop

Lew said:
What exactly are you measuring here,

Google hits for search terms.
and exactly how does it indicate how many programmers there are, much less
how many know each language?

This is an estimate of the number of web pages (excluding the terms xml and
sql) related to programming in each language. The more popular a language,
the more pages it will have.
Are you suggesting that there are 1.65 x 10e6 programmers who know C?

I'm assuming that 6.5x as many Java pages as C# pages indicates that there
are 6.5x as many Java programmers as C# programmers.
Have you factored out programmers who know more than one language?

No. The implication there is that many people might have learned C# but do
not use it. Is that more likely for C# than the next language?
Why did you leave F# off that list? Javascript? PHP?

There are many other languages that could be added to the list.
Why do you consider XML a programming language? It's a markup language.

I listed C, Java, C++, Perl, Python, Ruby, D and C#. I did not list XML.
The -xml asks Google to remove those pages.
The commercially viable programming languages right now are led by BASIC,
SQL, C, C++, C#, Java and COBOL in the desktop and enterprise world; add
Perl and PHP to that for Web crap.

Perl is used a lot for Unix admin. I'm not sure what exactly you mean
by "commercially viable" in that context. We deal with other languages
commercially, for example.
 
E

Enkidu

Jon said:
Then why did they develop a common language run-time and start pushing
IronPython and F#?
Because they are a good basis to move to GWBasic.

In GWBasic this is a complete program:

10 Print "Hullo World"

This would require up to a dozen lines of declarations and other
unnecessary rubbish in any other language.

This is a loop in GWBasic:

10 Print "Hullo World"
20 GOTO 10

Succinct, does what you need with a minimum of fuss.

There are no confusing procedures or methods or objects in GWBasic. It's
just in-your-face code. The ideal programming language.

Cheers,

Cliff
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top