>>10
Since most male prostitutes are of the gay variety, this raises an important question, which will form the basis for our next exercise:
Exercise 2.1
Does using Lisp make the person gay, or do you have
to be gay in order to use Lisp? Answer the question
using nothing but Adobe Photoshop, a picture of Paul Graham
and the inductive property of ℕ.
Start with ECMAscript.
Implement a simple microcontroller emulator in it.
Write an assembler.
Implement a simple Forth in Assembly.
Implement a simple Lisp in Assembly.
Implement a simple Prolog in the simple Lisp.
Implement a simple Smalltalk.
Implement a Meta-Object Protocol in the simple Lisp.
Implement a Linda Tuple machine.
That would be an interesting course and would cover all of the foundations of programming.
Unfortunately 90% of your students would complain that it involved wasting all of your time learning non-factory work-skills, and would want you to teach all of the material in something useful like Java.
Name:
Anonymous2011-07-14 23:49
C
Name:
Anonymous2011-07-14 23:55
I'm not the OP, but what is the major difference between C and C++? I don't know a lot about programming. What can't I do in C that I can in C++, or vise versa?
Name:
Anonymous2011-07-15 0:08
>>18
C++ is just C with classes and a few other features. Some people think of C++ as object oriented C but C is already object oriented. C can do just about anything C++ can do, except perhaps multiple inheritance, but that's something that no language has ever gotten right and is therefore best to stay away from.
Name:
Anonymous2011-07-15 0:18
>>19
Do you need classes? I haven't gotten to classes in my python book yet.
C++ has vtables. Multiple or no, this is something C does not have. (you have to make one yourself)
Also templates.
also lots of languages have done multiple inheritance well. choke on it.
Name:
Anonymous2011-07-15 7:49
OP here, I think I'll start with HASKAL.
Name:
Anonymous2011-07-15 9:05
read k&r and never return to this place if u dont want to be for the rest of u live a unemployed BBC expert
Name:
Anonymous2011-07-15 11:00
>>19
Umm, templates are a bigger feature IMO than classes in C++. Seasoned C++ programmers prefer using templates and class composition over that of class inheritance.
The C preprocessor is no replacement (even the C1x preprocessor which has a limited form of preprocessor-time polymorphism).
>>27 switch is used plenty in C++ code for small fixed enumerations and what not that aren't extension points in your software, where you know things aren't going to change too much. switch statements are often faster than vtables, due to no call overhead, jump tables, and less cache thrashing. vtables are for where you anticipate needing to change or add new functionality. vtables have call overhead and less cache performance.
Anyone saying that you shouldn't use switch in C++, and instead use a polymorphic class hierarchal for everything is misguided. The true professional knows when and where to use switches and vtables.
Name:
Anonymous2011-07-15 16:12
The true professional knows when and where to use switches and vtables.
a lot of guys say "always" and "never" respectively. For instance, everyone who writes operating system kernels.
>>29
A lot of guys say (and are) ``true professionals'' too.
Name:
Anonymous2011-07-15 16:19
>>29
operating system kernels are trivial enterprise bullshit, not truly complex game engines.
Name:
Anonymous2011-07-15 16:38
C++ duplicates features of C. The duplicated features have to be used together. The duplicated features are mostly inferior to the C features that they replace.
Name:
Anonymous2011-07-15 17:13
>>31
Someone needs to seize operating system kernels by the throat and drag them to their apex.
Name:
Anonymous2011-07-15 19:49
>>32
why hello there yossi kreinin, why dont you get the FUCK OUT OF HERE
>>29 The true professional knows when and where to use switches and vtables. a lot of guys say "always" and "never" respectively. For instance, everyone who writes operating system kernels.
You have never seen any OS kernel. In particular, you have not seen Linux networking code.
>>49
Don't forget your ugly preparation which you can't use when you work with inferior people because only 1 out of 10 C programmers knows what this means: