port
Let me say at the start that, as I write this, my experience is not that diverse, nor am I highly skilled in all the languages I've come into contact with yet. In the order I learned them, I know QBASIC, C, DrScheme, and Java. And, uh, Tierran. So when I say "imperative", I'm speaking from my C experience; "functional" refers to my DrScheme nightma..., er, experience, and "object-oriented" means Java, along with what I've heard about C++. My background in particular: QBASIC from early childhood to middle school or so. C starting after high school senior year. DrScheme in Caltech CS1 and CS2, freshman year. Java in CS3 the final third of freshman year. So, what programming philosophy is best? One of the main things we desire in a programming language is being able to do stuff. Raw assembly offers no structure and is quite crocky and nonportable, but it's fast and powerful, and for this reason tight inner loops are often coded in assembler. (Whether they need to be is a topic for another time.) It's said that C combines all the power of assembly language with all the ease of use of assembly language, and C is indeed not a very high level language. It does offer much richer structure than assembler, of course, which is why I like
When the compiler sees [that C++ code], here's the unoptimized C-style function it generates before compilation and assembly A good way to write clean code is to break up a program into discrete chunks, and then create black boxes that do the required actions. This way, nasty unplanned interactions between black boxes can be prevented, while inside each black box there can be any amount of crocky machinery you like - though it's better to have yet more black boxes! Now, functional programming languages were developed with the philosophy that proving that a function works perfectly is a good thing. However, if you want to get anything done in a functional programming language, it's generally hard and nasty. Computers operate in an imperative manner: completely sequentially, doing one thing right after another. Humans think in an imperative manner: Do action X, check condition Y, and then possibly perform action Z. Neither humans nor computers think in a functional manner, and it's unnatural to force either into doing so. I am interested in good programming practices, because every time my code crashes and munges the data it ought to be treating nicely, it's the fault of my improper technique. I am not interested in video memory, disk controllers, or interrupts (yet). I want to have black box interfaces that do stuff for me that I can completely forget about. And I judge the quality of a black box by how much I can forget about it. One claim is that C++'s interface to assembly is one of the things that makes it better than C. This doesn't really matter. Assembly is inherently nonportable, and having a portable way to indicate that nonportable code is coming up is just... useless.
Some topics in this essay:
QBASIC BASIC,
C++ OOP's,
Java CS3,
Java OOP,
Bugs Memory,
DrScheme Java,
Pardon Caltech,
Java I've,
,
imperative programming,
goto statements,
programming language,
programming languages,
CS1 CS2,
black boxes,
functional programming,
reading entire source,
nonportable behavior,
imperative manner,
black box,
garbage collection,
functional programming languages,
imperative programming language,
Join now to see the rest of the essay!
Approximate Word count = 2035
Approximate Pages = 8 (250 words per page double spaced)
More Essays on port Professional Papers: |
CUSTOMER SERVICES
|
|
Saved Papers
You haven't saved any papers.
|