jump to navigation

Scala: Beginnings October 24, 2009

Posted by ddouthitt in Functional, Object-orientation, Scala.
add a comment

Scala is an object-orientated language (similar to Smalltalk) that runs on the Java Virtual Machine. It can be compiled to Java byte-code, which means it will run at compiled speeds.

Scala is also a functional language as well, allowing the programmer to use the same programming methods as languages such as LISP.

In Scala, everything is an object – which is really the way it should be. A lot of “object-oriented” languages don’t subscribe to this requirement – such as Java. Smalltalk, Ruby, and Scala all do – and are sometimes called “pure” object-oriented languages.

The biggest obstacle in learning an object-oriented language is learning all of the classes and methods. Smalltalk makes this easy with a class browser, but languages such as Ruby (scripting) and Scala (compiled) don’t, as there is no way to learn the classes except studying references.

Going from the traditional imperative style to an object-oriented style of programming is not all that hard; it is a one-time “shift” in thinking. It is the classes and methods that require study.

Ruby has a good class reference (both in book form and as a web reference) – and Scala has one for the most recent version 2.7.7 (using the traditional scaladoc format) or one for 2.7.1 (in the new vscaladoc format). It can be also downloaded as a package.

Programmagic: Programming and More October 22, 2009

Posted by ddouthitt in Uncategorized.
add a comment

This is a blog about programming – in all languages. I have been programming in some fashion since 1976, in BASIC, C, FORTRAN, Pascal, C++, Korn Shell, Assembly (IBM 360 and 6502), FORTH, LISP, Perl, Ruby…

Topics include methods, concepts, new languages, trials and tribulations, and my learning as I go. Languages covered will vary widely but will likely initially focus on iTcl, Eiffel, LISP, and Scala.

Itcl is an object-oriented version of Tcl. Object-orientation will be a common theme – Eiffel and Scala are both also object-oriented.

However, functional languages are also of interest; LISP and Scala are both functional languages (Scala has both object-orientated and functional capabilities).

Any and all programming topics are of interest – and hope you’ll come along for the ride.

Hello world! October 22, 2009

Posted by ddouthitt in General Languages.
add a comment

This post was originally an automated first post – but the topic is appropriate for this new blog about programming. “Hello world” is traditionally one of the very first programs written in any language.

Wikipedia has an article on it, and Wikibooks has an extensive list of program examples; there is even a joke over at gnu.org about it.

“Hello World” is a simple program in most any language, and provides the initial introduction to syntax. It is usually very short and easy to type in and process. There also may be different ways to do it, given different methods.

Update: There are more sites that show various “Hello World” programming language examples. This article lists 300 languages! This German site lists a lot as well.

There used to be a page for Hello World programs set up by the student chapter of ACM at a Texas university – either Texas A&M or the University of Texas. The most notable programs on this site were the multi-lingual entries: programs that could be run or compiled by different languages without change – astounding!