Aside from C compatibility, C++ also allows one to create simple structures and procedures when such simple beasts are appropriate.
I currently suspect one should have either "full" object orientation plus weak typing OR weak object orientation plus strong typing. Strong typing plus full OO = Bondage and Discipline language, where the size of the code itself starts to really drag your development and debugging time down.
While Ruby or Python allows compact but slow code, Java and C#, among other excesses, force one to create a full class for every two-field data-structure. Thus C++ is more compact than C# and Java and faster than Python and Ruby, winning for race for a desktop application language (oddly enough, desktop apps need a fast language because they must compensate for desktop windowing systems being more bloated and users expect more from their machine each).
I'm sure Haskell or Lisp are excellent for some things but I don't think their paradigm is very compatible with GUI programming - I'd be interested if someone has a counter-example.
AutoLisp is just a thin scripting layer.
See <a href="http://www.fourmilab.ch/autofile/www/autofile.html>the autodesk file</a>.
Anyway, some more examples then:
Yes, I've seen people work wonders with AutoLisp. There was - probably still is - an application used for designing clothes. The designer creates, I think, a "size 8" and a lisp script generates the other sizes.
AutoLisp being lisp-like is really a happy accident. The Autodeskers chose Xlisp IIRC because it was free and embeddable. If they could have embedded a C-like language interpreter, they would have.
In fact later, AutoDesk introduced other languages and tried to push users onto them. But AutoLisp already had huge momentum.
var simple = new { Field1 = "foo", Field2 = "bar" };You're missing a crucial part of the equation: type inference. OCaml does what you want :-)
I someone is coming up with a type-infering variant of Ruby called Juby which could do the trick once it is work.
Now, has anyone coded a GUI with Ocaml?
Now, whether the types should be dynamic or static, is entirely up to the situation and what kind of system you are building.
* You have to actually run the dynamic runtime, which even OS X's XNU doesn't do.
* The dynamic runtime also obscures what's going on with the hardware, which can be a problem in embedded environments.
I like Objective C but it's always felt like voodoo to me. I'm always more comfortable in Ruby+C than I am in ObjC.
I think Objective C is a better object oriented C than C++. It's simpler, makes a syntactic distinction between message passing and "traditional" C, and has a more dynamic run time. I'm surprised no one else has brought up Objective C as a better solution to the "make C object oriented" problem.