Professional Documents
Culture Documents
Homework 1
Homework 1
Homework 1
Programming Language1
The basic idea of dynamic semantics is that the meanings of sentences are not propositions but
rather functions that alter the context. They also must be checked at the run time.
Static Semantics: Whether syntactically valid statements have any meaning, and not all semantic
(a) What was the first programming language you learned? If you chose it, why did you do so? If it
was chosen for you by others, why do you think they chose it? What parts of the language did you
The first programming language I learned is Python, but it’s not my best programming language so
I won’t choose it as my favorite one. I think my favorite programming language is Java. I like it
because it’s easy to work with, and the error detecting is helping me so much when I face an error
in my code. Java was chosen by my university to be learned, and I think they chose it for it’s ease,
flexibility and security. I think the most difficult parts in Java are how to memorize the code with
no errors, and the no experience that I have with the programming in general.
(b) For the language with which you are most familiar (this may or may not be the first one you
learned), list three things you wish had been differently designed. Why do you think they were
designed the way they were? How would you fix them if you had the chance to do it over? Would
3
there be any negative consequences, for example in terms of compiler complexity or program
execution speed?
I don’t have any thing in particular that I wish it had been designed differently, I feel like
Using an Internet search engine or magazine indexing service, read up on the history of Java and
C#, including the conflict between Sun and Microsoft over Java standardization. Some have
claimed that C# is, at least in part, Microsoft’s attempt to kill Java. Defend or refute this claim.
Sun Microsystems and Microsoft have settled their long-running lawsuit over Microsoft's use of
Sun's Java software. Sun scored a victory in this case when the judge ruled that Sun was likely to
win its case based on the merits and issued a preliminary injunction in Sun's favor. The injunction
forced Microsoft to modify the Java technology it had distributed in its operating system, Web
browser, and development tools so that it passed Sun's tests. In my opinion, Microsoft had what
they deserved because they breached the contract between them and Sun Microsystems by trying to
extend Java so it would work differently, and Sun On the other hand did all what they have to do to
defend themselves.
Garbage collection is a type of memory management. It automatically cleans up unused objects and
When memory is deallocated, but not all pointers to it are removed, the pointers are called dangling
references -- they point to memory that is no longer valid and which will be reallocated when there
is a new memory request, but the pointers will be used as tho they still pointed to the original
memory.
4
5. Explain the distinction between interpretation and compilation. What are the comparative
advantages and disadvantages of the two approaches?
The difference between an interpreted and a compiled language lies in the result of the process of
interpreting or compiling. An interpreter produces a result from a program, while a compiler
produces a program written in assembly language. ... If the program is complex, pieces of it may be
spread across several files.