Quote:Obviously, there are various levels of type safety, and indeed an actually safe type system wouldn't be appropriate for C++. For example, having a type safe language while still allowing pointer arithmetic is not possible, and in the case of C++, pointers simply win the day without argument. For the record, I do consider the fact that dereferencing a null reference is possible in C# as unsafe (though most definitely not buggy.) Note, however, I'm not saying that any and all unsafety is always bad. Languages are different, that's just the way it is.Quote:Uh, yes. C++ has strong type safety, but also gives you mechanisms to circumvent this system if you need to. Some of these mechanisms still check for invalid type conversions to an extent (static_cast) while others hand over trust completely (reinterpret_cast, C). It largely prevents type errors, and when it doesn't prevent them it still discourages them - the one flaw here is that C-style syntax can still be used instead of the rightfully-ugly reinterpret_cast syntax.Quote: Original post by HodgmanWould you really call a language that lets you cast pointers back and forth at will type safe?
what are you on about with C++ not having type safety?
Simply adding the mechanism for circumvention doesn't remove the rest of they type system -- you may as well argue that C# is a buggy language because you can *choose* to access a null reference.
Quote:I didn't think implying a somewhat excessive liking for a particular technology would rouse that strong feelings; I'm not shy about the fact that I like Haskell more than what might be strictly rational. Anyone claiming to be completely objective and impartial about programming languages would be lying. I guess the wording was unfortunate though.Quote:He knows what it means -- you made a personal attack against his character by implying that he's arguing against you simply because he "thinks C++ is leet" -- attacking the person not the argument. Now on top of that you're attacking his vocabulary for no reason. FFS indeed.Quote: Oh FFS, are you done with your petty Ad Hominems yet?I don't think that word means what you think it means. Why are you getting this upset over a friggin' language?
Quote:Actually, yes:Quote: That's why "language X doesn't have feature Y so it's less powerful than language Z which has that feature" is such a stupid line of reasoning.Ok... but no one said that. Stop being belligerent.
Quote: One could argue that the competitors to C++ are not languages which "stay out of the way". They have, for example, no multiple inheritance or operator overloading not through a technical limitation but exactly because they want to limit the power of the user.(My emphasis.)
EDIT: it's interesting to note that questioning C++ as the One True Language while essentially agreeing with everyone else about its usefulnes has lead to a rating drop 5x the size of the worst I ever got from participating in any inflamed religious or political debate. I guess it's a good thing the Middle East isn't run by programmers or we'd be in the middle of WWIII by now. [grin]
[Edited by - Valderman on June 3, 2010 7:03:27 AM]