views:

257

answers:

4

Subjectively,

  • What is the most consistent programming language? [why]
  • What is the most inconsistent programming language? [why]
  • Does the inconsistent language have any abstraction libraries to improve consistency?

I believe C is the most consistent and organised language, as functions have generally the same argument ordering, as well as the good function naming scheme.

PHP, being ironically loosely based off of C, is very, very inconsistent. There are so many duplicate functions, as well as every function having a different argument ordering. Some functions use camelcase, while others use underscores. You also can't use the [] operator on a function call, for no good reason at all, requiring you to set a variable to the function return value.

I am not aware of any abstraction library present to make PHP more consistent.

+4  A: 

I believe C is the most consistent and organised language, as functions have generally the same argument ordering, as well as the good function naming scheme.

Neither of those things is an attribute of the programming language. Maybe of the standard library, although you could hardly describe it as having a good function naming scheme. So it's difficult to know what criteria you have in mind here.

EJP
A: 

C# is Most Consistent, it has brought fairly new concepts and gives lots of flexibilities. Just apart from language, Microsoft's state of art documentation and help files make it extrememly strong programming language with lot of examples.

PHP is most inconsistent, poorly documented, poorly managed, its like a junk yard with lot of comment/text thrown at by everyone who probably have no idea of what software engineering is.

Akash Kava
This is absolute rubbish. Java has had better documentation than C# since basically forever. Any reasonable person knows that using the MSDN is typically a nightmare, but it's getting better. Your rating has nothing to do with this so-called "consistency". It's what you prefer. You are entitled to that opinion, but it's not really a useful one to discuss without significant work, IMHO.
Noon Silk
Really, you found PHP to be poorly documented?
+2  A: 

Consistent: APL, and its successor, J.

Everything is an array (well, there are scalars), and all the operators operate on arrays as a whole.

Ira Baxter
I also downvoted you for the same reasons that I downvoted Akash and Missing Faktor. Your rating is subjective and fairly meaningless I think. So what if everything is an array. I don't see how this makes anything more "consistent".
Noon Silk
@silky: You know nothing about array languages (http://en.wikipedia.org/wiki/Array_programming) and you still downvote this answer. Bravo. That's what I call misusing the power.
missingfaktor
@Ira Baxter: +1, simply to balance the idiotic downvote by @silky.
missingfaktor
I see no reason you for you claim I don't know about array programming, and I also see no reason to consider downvoting a 'power'. I'm downvoting answers in here to demonstrate how pointless this thread is. My opinion differs to yours; there is no correct answer here, the question is poorly defined and IMHO it should be closed. But I will not continue to participate in here; I've made my point.
Noon Silk
@silky: Then downvote the question, or vote to close it. No point in going about downvoting all the answer in this thread.
missingfaktor
@Missing Faktor: I already did (I don't think it deserves a downvote, but it does deserve to be closed, which it was, but then it was re-opened, and I cannot vote to close again).
Noon Silk
@Missing Faktor: And just incase you don't know, downvotes in CW mode mean nothing. It's just for sorting the answers. It doesn't affect reputation.
Noon Silk
@silky: I know that. Still I don't think your downvotes here are justified.
missingfaktor
@Missing You're entitled to that view. I think we've discussed this as far as it can go. I won't respond to more comments.
Noon Silk
+3  A: 

Most consistent: Lambda calculus. Utterly minimal, yet you can actually write programs in it! And then, LISP and others with solid formal basis and little syntactic sugar.

Least consistent: pick your least favorite. I personally hate TCL. It can't decide whether it's a shell or a real programming language. The scoping semantics are bizarre and awful, and tend to make program flow and organization impossible to decipher. But yeah, Frankenstein web systems suck… I just haven't had the pleasure.

As for C being ideal,

  • Consider the different ways to define a constant. There's #define, enum, and const.
  • Sometimes an array (or the name of an array) is just a pointer, sometimes it's a real object.
  • setjmp was initially ill-specified resulting in draconian rules for nonlocal goto.
  • Compiler hints such as register and auto became obsolete. Meanwhile other keywords such as const and restrict were introduced as extensions, some later standardized and some not. Some compilers introduced generic syntax for such extensions such as GCC __attribute__, but standardized generic tag syntax will only be gradually phased in with C++0x.
  • The meaning of modulo and division with negative divisors was only standardized in C99, meaning that C++ remains ambiguous until C++0x. (And the way they did define it, integers cease to be a ring.)
  • Multithreading is unspecified, where thread library functions must implement often ill-specified informal memory fences. (Fixed in C++0x.)
  • Tuples have faced a long, slow adoption path. Even C++0x is inferior to say Caml. (On a related note, the lack of type deduction has only encouraged programmers to defeat strong typing with casts.)

This is just what I can think of. Sure these faults are nitpicky, but perfection is achievable and we shouldn't settle for less.

Potatoswatter