# Programming style abominations

**URL:** <https://boards.straightdope.com/t/programming-style-abominations/429810>\
**Category:** The BBQ Pit\
**Created:** [December 13, 2007, 3:24am UTC](https://boards.straightdope.com/t/programming-style-abominations/429810 "2007-12-13T03:24:00Z")\
**Posts on this page:** 1\
**Page:** 7

<div class="post-metadata">

**Author:** ![Derleth](https://avatars.discourse-cdn.com/v4/letter/d/b9e5f3/32.png) [@Derleth](https://boards.straightdope.com/u/Derleth)\
**Post date:** [December 18, 2007, 11:12pm UTC](https://boards.straightdope.com/t/programming-style-abominations/429810/121 "2007-12-18T23:12:44Z")

</div>

[QUOTE=friedo]  
But I must disagree with you about C#. If you need to do some object-oriented systems programming, which would you rather use? Bjarne’s abomination, or a clean super-set of C with bounds checking and garbage collection?  
[/quote]  
First, you left out the language C# is going up against: Java. Comparing C# to C++ is going to make C++ look bad because C++ is aimed at a different goal, namely programming where you can’t afford garbage-collection for whatever reason.

Second, I’d prefer Common Lisp, and I’d likely recast the problem in a way that doesn’t need object-orientation. If OO really is the most natural way to look at things, CLOS is both standard and very good.

> [@](#):
>
> Personally, though, I really like Objective-C.

So do I. C++ always seemed like a trick: Fool the C programmers with syntax while making them use a Simula/Pascal clone with much, _much_ stronger type safety requirements than C enforces. Objective-C, on the other hand, was obviously designed by someone who liked C and later got impressed by Smalltalk. Much cleaner, much easier to learn, and much easier to understand at a fundamental level. Plus, of course, no name mangling. 🙂

> [@Indistinguishable](#):
>
> This is a very piddling matter, but let me just say, I find it an aesthetic improvement. car and cdr should be the least defined operators whose product is a right inverse to cons. There’s no clean reason for them to be applied to anything other than a cons cell, and if the type system isn’t strong enough to prevent them from being so applied anyway, then they need to at least man up and produce an error. Silently producing some arbitrary value just for the sake of misguided “convenience” is nothing more than a failcess.

Your version of cleanliness breaks code that both works and is perfectly readable. I’m more willing to go along with the existence of #f to prevent the punning on NIL, because code that punned that way was pretty grody to begin with, but modifying the behavior of car and cdr just reeks of schoolmarmish enforced hygiene.

On the plus side, I’m now aware of a reason they did that. Thanks. 🙂

[Previous page](https://boards.straightdope.com/t/programming-style-abominations/429810.md?page=6)
