字幕表 動画を再生する
-
- Okay, welcome, welcome.
-
I hope you're sitting comfortably.
-
My name is Mads Torgersen,
-
and known in America as Mads Torgersen.
-
I work on C# for Microsoft.
-
I'm getting old, so I always carry a t-shirt
-
with the name of the program and language
-
I'm working on in case I forget.
-
And I'm here to talk about C#,
-
and why it may be worth thinking about,
-
even if you haven't so far.
-
So let's get the embarrassing details over with.
-
How many people are already familiar with C#?
-
(laughs)
-
That's a lot.
-
How many are not?
-
Wow.
-
So I will completely fail,
-
introducing somebody to C# at this talk.
-
Good to know.
-
We can maybe breeze over some details I had planned on,
-
and get into some I hadn't.
-
So, even so,
-
they say that the reason why
-
they make those SUV commercials,
-
is not to make people buy them.
-
It's to make the people who already bought them feel good
-
about the fact that they did.
-
So maybe I can achieve that.
-
So, I have been asked to remind you to evaluate the talk.
-
It's good for me, because then if I do something
-
in an unsatisfactory way, I can do it better
-
next time, maybe.
-
And it's good for the GoTo folks,
-
because then they can decide
-
whether to invite me again some other time.
-
So this is in the feel-good department.
-
Stack Overflow have a survey every year
-
of their developers,
-
and they ask them various questions,
-
and, of course, it's skewed,
-
and unscientific in all kinds of ways.
-
First of all, you have to be on
-
Stack Overflow to participate,
-
but I like the numbers, so I'm gonna use them anyway.
-
So if we look here,
-
C# is a very widely used language.
-
It's number four here, of the three above,
-
one of them is not a programming language.
-
So I'm not talking about JavaScript.
-
I'm talking about SQL.
-
So C# is definitely a language
-
that's in broad usage already.
-
It's one of the, sort of, main mainstream languages,
-
if you will.
-
And they also ask people
-
whether they would like to continue
-
using the language they're using,
-
and they use that to rate the most loved technologies.
-
And it's interesting to see that C# is on this list as well.
-
So people actually love C#, to some degree.
-
There are some languages that they love more,
-
but if you notice, many of them are languages
-
with smaller audiences, sort of very dedicated
-
audiences that are maybe more part of a cult
-
or something.
-
But it's only a few here at the bottom
-
that are actually in both lists,
-
that are both highly used and highly loved.
-
So it's nice to be one of the three technologies
-
on that list, two of which are programming languages,
-
and yay for Python also for being on there.
-
Right so, we and Python, we must be doing something right.
-
And we constantly try to think about,
-
what is it that we're probably doing right,
-
that we have still fairly enjoyed
-
programming language after all these years.
-
So it seems to be not the fact
-
that everybody uses to C# just because they have to,
-
because people did 10 years ago at their company,
-
and they have all this legacy code.
-
There seems to be some kind of energy around,
-
and we wanna try to keep that going.
-
And we have some ideas about why that may be,
-
and that's sort of what is driving
-
our language evolution, if you will.
-
So we'll get back to that a little bit later.
-
But I think one core thing to point out here is that
-
we are very eager to evolve C#.
-
Like if you look at the language evolution
-
scale from a little to a lot,
-
we are kind of over there.
-
As mainstream languages go, we kind of tend
-
to be pretty aggressive about keeping the language fresh,
-
and keeping it modern.
-
And as the programming language
-
state of the art evolves, so do we.
-
And sometimes we are the movers,
-
and sometimes we are the followers,
-
but we try to keep the language
-
a good choice for programmers in modern day.
-
Not just something you have to do
-
because somebody made that choice
-
in a previous decade.
-
So that's kind of our philosophy around it.
-
I also wanna point out F#, because it's our little sister
-
language, and it's very popular,
-
because it's also very small.
-
And there's a talk next door
-
about it at the same time.
-
So I'm sorry that those are scheduled at the same time.
-
But F# is a very much more functional language,
-
and we have a lot of benefit
-
from the collaboration with F#,
-
and the kind of inspiration that it gives us
-
in the C# language design as well.
-
So I wanted to call that out.
-
So how many of you use C#
-
on something other than Windows?
-
Okay, thank you.
-
It looked like none for a second there,
-
now it's more like two percent.
-
Good.
-
That's a lot.
-
So most people use C# on Windows,
-
and that's because that pretty much used to be
-
where you could use C#.
-
And we kind of are changing our tune on that.
-
So part of the reason I wanted to frame
-
the talk in this way was that we're really pushing.
-
It's sort of increasingly been the case,
-
that you can use C# elsewhere,
-
but we're pushing to make that an option, right.
-
We're sort of in this weird situation,
-
where C# has been a massive,
-
main programming language in Windows,
-
but at the same time,
-
we are like complete newcomers
-
to some other platforms.
-
At least mostly so.
-
And so it's this interesting situation,
-
where now that it's actually becoming an option
-
on all the platforms,
-
we're at the same time very entrenched,
-
and also very new and kind of the fledgling
-
language on some of those platforms.
-
We're eager to help that adoption
-
on those other platforms.
-
One other thing that is changing how and where
-
you can use C# is the fact that we've evolved
-
our language technology.
-
So the compiler and IDE technologies
-
that underlies the implementation
-
of the language quite a bit,
-
what we call Project Roslyn,
-
and that's enabling some, I think,
-
quite unique scenarios about
-
how you can program in C#.
-
I'm gonna show a little bit of that,
-
because I think it's nerdy and cool,
-
and maybe it's also useful to you.
-
One of the consequences of that is that,
-
that work on sort of the language core,
-
and ripping it out of the, sort of,
-
Windows and Visual Studios specifics,
-
means that it's become very easy,
-
as these things go,
-
to implement C# and others IDEs.
-
So you can essentially use C# in your favorite IDE,
-
and we'll talk a little bit about that as well,
-
or your favorite editor.
-
And of course, one of the big changes is we've moved
-
from being a completely proprietary technology,
-
to being completely open source.
-
So everyone can contribute to C#,
-
and a lot of people do.
-
And we're getting a conversation
-
with the community that's vastly different now.
-
It's more of a collaboration project,
-
as opposed to, "Microsoft says..."
-
And that's very exciting.
-
It means that, rather than coming out
-
every three years or whatever, and saying,
-
"Ta-da, this is what we worked on, hope you like it."
-
We are now in a very open dialogue
-
everyday with the community about our direction.
-
We get feedback all the time.
-
Like probably, tens of you will come to me after,
-
and say why we should be doing something different,
-
or proposing things.
-
And that happens online, and on GitHub,
-
and elsewhere as well.
-
So we have a much better,
-
we have much better quality
-
on our design work as a result of it, I think.
-
Okay, so that's a couple of good things.
-
Let's start with some of those other places
-
that C# are.
-
So how many people here have used Xamarin?
-
So a few there.
-
Have you all, you must all have used Xamarin
-
on non Windows platforms, right?
-
That's probably the reason why you do.
-
So Xamarin, how many people are aware what Xamarin is?
-
Okay, about half.
-
Xamarin, it used to be a separate company.
-
We acquired them six months ago.
-
It's a technology for using C#
-
to target, to make native apps for Android and iOS.
-
So it's technology that's very much based on
-
letting you use the same language,
-
and the same source code, for the most part,
-
to write apps for multiple different
-
mobile platforms, right?
-
So it works on iOS, it works on Android.
-
It actually targets Mac as well,
-
and by the way, Windows too, if you want to.
-
And it creates high-quality native UIs.
-
It's a number of big apps that are using this technology,
-
because it saves the effort of separate implementations
-
on those platforms.
-
It also lets you use the language
-
that you can use on the back end as well,
-
which, yes you can with Java,
-
but it's not quite there yet with Swift or Objective-C.
-
And so, it's sort of economy of scale,
-
and it's also just a very good language
-
for implementing apps.
-
It's based on the Mono project.
-
How many people know about the Mono project?
-
Okay, about half.
-
That is an open source implementation
-
done by people outside of Microsoft many years ago,
-
and maintained ever since to target C#
-
to other platforms and Windows.
-
While we at Microsoft were sort of tunnel-vision
-
on Windows for many, many years,
-
these people saw the cross platform potential
-
of C# much before we did and implemented
-
this great cross platform.
-
Cross platform implementation.
-
So Xamarin is based on that,
-
and a lot of the apps that you see
-
in the iOS or Android are stores
-
that are actually based on C#.
-
Either because of Xamarin,
-
or because of Unity,
-
which is probably the industry leading game engine.
-
So if you're up there on the back rows
-
playing a game instead of listening,
-
chances are, it's written in Unity.
-
Right, so even your hands are engaged i