1
00:00:02,068 --> 00:00:07,030
In the next several videos we're going to
apply what we've learned in the class to

2
00:00:07,030 --> 00:00:11,088
analysis of various features of Java. This
will give us a chance to both look at a

3
00:00:11,088 --> 00:00:16,313
real programming language and how it's
designed and been done. And also to talk

4
00:00:16,313 --> 00:00:22,123
about some features that art in Cool that
we haven't been able to cover thus far in

5
00:00:22,123 --> 00:00:29,558
the course. For the perspective of this
class, Java is a kind of Cool on steroids.

6
00:00:29,558 --> 00:00:35,333
It's Cool plus more features, many more
features. At, at their core Java and Cool

7
00:00:35,333 --> 00:00:40,826
are very similar. Java and Cool are both
typed object oriented garbage collected

8
00:00:40,826 --> 00:00:46,822
languages. They were both designed in the
early 1990s and so they share a common

9
00:00:46,822 --> 00:00:51,990
culture there with the ideas that were
current at that time. So in this video,

10
00:00:51,990 --> 00:00:56,127
I'm just going to give a little bit of
history of Java so that will be the focus

11
00:00:56,127 --> 00:01:00,104
really of this rather short video. And
then in the subsequent videos, we'll talk

12
00:01:00,104 --> 00:01:04,063
about all the features or some of the
features of Java that are not in Cool. And

13
00:01:04,063 --> 00:01:07,951
we'll use the ideas of course that we've
been discussing all along through the

14
00:01:07,951 --> 00:01:12,395
class, to explain a little bit about those
ideas. But I think these are all important

15
00:01:12,395 --> 00:01:18,176
language constructs that are unfortunately
were too time consuming or too complicated

16
00:01:18,176 --> 00:01:23,948
to add to the course project. So I think
it's useful to use a language like

17
00:01:23,948 --> 00:01:32,083
[inaudible] to illustrate how these ideas
work and what some of the issues are. So

18
00:01:32,083 --> 00:01:37,017
Java began as a project called Oak at SUN
Microsystems and it was originally

19
00:01:37,017 --> 00:01:41,062
targeted at set top devices. And so what
was a set top device? This was a little

20
00:01:41,062 --> 00:01:46,292
box that was gonna sit on top of your TV
So you had your TV screen, and then there

21
00:01:46,292 --> 00:01:50,246
was going to be this little thing up here
that was going to sit on top of the TV

22
00:01:50,246 --> 00:01:54,763
that was going to control all your cable
programming. So this would essentially

23
00:01:54,763 --> 00:01:59,413
would connect to some kind of network and
it would help you to do, you know to make

24
00:01:59,413 --> 00:02:03,368
your TV more interactive. Okay, so this
was back in the days before every TV was

25
00:02:03,368 --> 00:02:08,784
really a computer by itself. The initial
develo pment of, of Oak took several

26
00:02:08,784 --> 00:02:15,449
years. I believe the project ran from
about 91 to 94 and what happened, at least

27
00:02:15,449 --> 00:02:21,914
as I understand it, is that this set top
device market just never took off. So this

28
00:02:21,914 --> 00:02:28,090
never became a popular never, never became
a popular idea with consumers and, and so

29
00:02:28,090 --> 00:02:34,433
there really was a kind of limited up side
or a limited potential for, for Oak at the

30
00:02:34,433 --> 00:02:39,696
time. And then something happened, the
Internet happened. So also in the early

31
00:02:39,696 --> 00:02:45,769
90s the Internet revolution was really
gathering steam. Everybody was getting on

32
00:02:45,769 --> 00:02:51,289
the Internet and it became obvious
sometime 93, 94 that there was going to be

33
00:02:51,289 --> 00:02:56,752
a need for programming languages that
really addressed these specific issues on

34
00:02:56,752 --> 00:03:02,039
the Internet. And in particular people
were very concerned about security. And,

35
00:03:02,233 --> 00:03:07,846
they didn't want to be downloading lots of
binaries that were programs written in C

36
00:03:07,846 --> 00:03:12,920
and passing those around on the Internet
because it was just really no guarantee

37
00:03:13,117 --> 00:03:18,627
that those programs would work as intended
and not crash your machine. So you know,

38
00:03:18,627 --> 00:03:24,156
they needed to be able to share code over
the Internet from other people that you

39
00:03:24,156 --> 00:03:29,671
didn't necessarily trust completely meant
that we needed safer languages than

40
00:03:29,671 --> 00:03:34,958
languages like C and C++ and so there was
an opportunity there for a, a new language

41
00:03:34,958 --> 00:03:41,413
and there were several candidates
actually. Besides Java, Tickle and Python

42
00:03:41,413 --> 00:03:49,431
were very serious candidates to become the
Internet programming language eventually

43
00:03:49,431 --> 00:03:55,443
the backing of SUN Microsystems, the
backing of SUN gave to Java helped it to

44
00:03:55,443 --> 00:04:01,468
really gain a very, very strong presence
on the Internet. But you know, the point

45
00:04:01,468 --> 00:04:06,573
of this story is that every new language
needs a killer app. Every programming

46
00:04:06,573 --> 00:04:11,898
language rides into the world on the back
of some application. So there has to be

47
00:04:11,898 --> 00:04:17,305
some kind of new application that people
want to write that the existing languages

48
00:04:17,305 --> 00:04:22,069
don't serve very well and that provides
the opportunity and therefore makes it

49
00:04:22,069 --> 00:04:27,084
worthwhile for people to learn a new
programming language. And so the fact that

50
00:04:27,084 --> 00:04:32,533
Ja va was a very safe language, it had the
garbage collection. It had the type system

51
00:04:32,533 --> 00:04:38,251
that made it well suited at the time to
the, the needs of the emerging needs of

52
00:04:38,251 --> 00:04:43,451
internet programming. And it became very
popular I think primarily because of that

53
00:04:43,451 --> 00:04:48,379
reason. And if you if you recall there was
a lecture or a video early on, on the

54
00:04:48,379 --> 00:04:53,182
economy of programming languages. And I
would recommend actually that if you

55
00:04:53,182 --> 00:04:58,050
haven't watched that one, then you go back
and take a look because there I discuss

56
00:04:58,050 --> 00:05:03,404
some of these ideas about how languages
are adopted in more detail. So Java also

57
00:05:03,404 --> 00:05:08,507
came into existence in a particular
technical environment and it's very

58
00:05:08,507 --> 00:05:13,960
common. In fact, it's normal for new
programming languages to borrow heavily

59
00:05:13,960 --> 00:05:19,572
from their predecessors and new languages
are often mostly recombinations of ideas

60
00:05:19,572 --> 00:05:25,230
from previous languages in a new design
perhaps with some innovations thrown in.

61
00:05:25,230 --> 00:05:30,921
And the particular influences on Java.
Again this is at least so far as I

62
00:05:30,921 --> 00:05:37,662
understand it so the type system in Java,
or its, its commitment to types probably

63
00:05:37,914 --> 00:05:45,087
is traceable to Modula-3 and the ideas
there where people try to build a sort of

64
00:05:45,087 --> 00:05:51,355
programming language that would scale in a
realistic way to large systems but also be

65
00:05:51,355 --> 00:05:58,235
strongly typed. The object orientation of
Java is traceable to languages like

66
00:05:58,235 --> 00:06:04,106
Objective C and C++ and, and also Eiffel
which also had the idea of interfaces

67
00:06:04,106 --> 00:06:09,566
which is a prominent feature in Java. And
finally Java is quite a dynamic language

68
00:06:09,566 --> 00:06:13,931
meaning that there many things that are
not done staticly. They're done

69
00:06:13,931 --> 00:06:18,833
dynamically so features like reflection
would be one example of that. And there

70
00:06:18,833 --> 00:06:23,426
are actually quite a few other features
and there is some history there. There's

71
00:06:23,426 --> 00:06:28,690
some shared culture there with Lisp. This
was a or is a functional family language

72
00:06:28,690 --> 00:06:34,522
but is also a very, very dynamic language.
As I said at the beginning this video is

73
00:06:34,522 --> 00:06:40,360
just an introduction and overview and in
the next few videos, we'll be looking at

74
00:06:40,360 --> 00:06:45,340
specific features of Java and how they
work. And that will includes things like

75
00:06:45,340 --> 00:06:50,584
exceptions, interfaces, and threads. As
well as a bunch of other features that

76
00:06:50,584 --> 00:06:55,823
we'll discuss at least, briefly. One thing
to realize is that Java is a big language.

77
00:06:55,823 --> 00:07:01,009
It is not simple. The language manual for
Java runs to hundreds and hundreds of

78
00:07:01,009 --> 00:07:05,082
pages. It has lots of features. And
perhaps more importantly, lots of feature

79
00:07:05,082 --> 00:07:09,651
interactions. So. The hard part of
designing a language of course is getting

80
00:07:09,651 --> 00:07:14,832
all the feature interactions right. All
the combinations of the features and, you

81
00:07:14,832 --> 00:07:18,070
know making sure there are no surprising
interactions between them.
