a bold project

14 March 2013

Oooo! Object oriented programming in Bash shell; what a bold project.

oobash project

every programming language can have its own object system (maybe with the exception for qbasic :-)

Lisp has the common lisp object system (CLOS ) of course these are implemented as Lisp macros;


some people wonder if C** is worth the effort ( C** FQA )

One can always do Objects in C with abstract data types and function pointers instead of virtual functions; i suspect that the real ‘killer feature’ of C** is that one can do objects with fewer keystrokes; the other ‘killer feature’ is that the syntax seems familiar to C programmers, however this is deceptive, learning C** well takes a lot of time…

C** templates are sort of awful; D seems to have a better template facility ( link )

another big gripe about C** are header files - the feature inherited from C; every type or function defintion must be defined before use, so one has to include the text of the definition into the currently compiled source file; One of the nicer points of Java (and C#) as a language is that it gets rid of header files;

No that is because of the preprocessor; with C it gathers one source file with all included headers into one text, compiles it and type checks everything against the intermediate representation;

Java and friends compile one file as is and do type checking of what is known locally in that file, if there is a call to a method of an object that is not known from given information then that call is not type checked at this stage; Once all other files of a package have been compiled then it can perform type checking of calls from objects declared in the same package; the object signature lookup is conveniently done from class file - the same format that is used to run the stuff (but you can do without that like in D)

So that’s another major point where backward compatibility with C is not quite helpful.