But yeah, trying to arrange all languages along a single "axis of power" is a pretty pointless exercise...
412 karma · joined February 17, 2008
But yeah, trying to arrange all languages along a single "axis of power" is a pretty pointless exercise...
1, 2
and:
(1, 2)
That seems to make sense.
x, y = 1, 2
and [x, y] = 1, 2
and even x, y = [1, 2]
are all identical in function. Are there any (subtle) distinctions between the three?To give Blub programmers the warm-and-fuzzies, one assumes...
Admittedly, I don't have any metrics on how many people have abandoned Erlang because of single assignment, or Lisp because of the parentheses, but I'm sure such people exist.
And you might say that it's their loss, and I'd probably agree with you.
I did once manage to hack a pulse dial phone into making a call by tapping the receiver disconnect button, which is pretty tame by comparison, but it seemed tremendously exciting at the time.
I think I also used to dial random 3-digit numbers starting with * or # just to see what would happen.
Yes. It sounds like we agree that overriding a non-virtual method is a bad idea, and i think "mixing early- and late-binding" probably captures it quite well. The C++ compiler makes the programmer decide whether to use early or late binding, and handle the consequences.
In some other languages (let's say Self, for example), the distinction between early and late binding is handled by the compiler, so it's invisible at source level, and all methods are (implicitly) virtual unless the compiler can prove that a static call is safe, in which case it can inline the call. That means that the "early-binding conflict" situation can't arise in a language like Self.
And why is the keyword 'virtual' even necessary? Surely all methods should be virtual by default (and the compiler ought to be able to replace virtual calls with direct calls based on the type information). Can anyone cite an example of where you'd actually want to call different methods depending on whether you're using a base or a derived pointer?
I think trying to bolt an OO model onto C while retaining 100% source compatability was an interesting idea, but it turned out to be a bad one in the long run. 90% of the complexity in C++ you don't actually need, you can get by just fine with C, and you have the added bonus that you can hold pretty much the entire language and a significant portion of the standard library in your head the whole time whilst you code, which I never managed to do with C++.
Admittedly, my experience is probably informed by having to maintain some seriously hideous C++ code over the last 10 years.
So, there, C++ is a complicated language. Some might say it's too complicated, but I guess everyone has to do their own cost/benefit analysis on that.
Is that better?
(http://amalp.blogspot.com/2007/10/what-is-protected-abstract...)
If trolling through language implementations is your kind of thing, I'd suggest having a look at Lua or Python as well (I never got Perl to configure, let alone compile) - then you can compare and contrast with the way things are done in Ruby.
"In 1991, all that was left was the kernel, the brain within the brain of the computer, and thus the most essential component of any operating system, and the hardest part to create. Before Stallman could finish building his, an ingenious young Finnish computer scientist named Linus Torvalds—who was initially inspired by a Stallman speech at the Polytechnic University in Helsinki the year before—played off a Unix-like operating system called Minix to develop a free software system of his own. Incomplete in other respects, it had the kernel that Stallman's lacked—one that meshed so beautifully with the GNU system that it seemed destined for it. Strictly speaking, the complete operating system should have been called GNU/Linux, representing the combined contributions of Stallman and Torvalds. Stallman always insists on the term, pronouncing it "GNU slash Linux." But in the popular mind, it came to be known as only Linux. Stallman has never gotten over that."
Admittedly, I haven't invented any great stuff, but if I were to claim that it'll never be possible for a human being to travel at greater than light speed, am I going to look narrow-minded in n years time? (where n=10, 100, 1000)
Any statement about the future (which is, by definition, uncertain) has some percentage chance of looking absurd in retrospect - and it's a lot harder to make a correct prediction than a wrong one.