ICFP 2002 Contest Winners Announced
Georgwe Russell writes "The Winners have been announced at the official web site. Looks like OCaml and functional programming have won again, with the 3 member TAPLAS team. There is somewhat of an upset, though. Second place goes to 3-member team Radical TOO, whose entry was written in C! In the lightning round, the virtues of Python as a quick prototyping language were shown in the lightning division's winning entry by the OaSys one-man team. Does the skill of the programmer prevail over the limitations of the language and paradigm used, or is C nearly as good a language as OCaml?"
The proficiency in writing programs means more. :
Most languages are functionally equivalent,
you can even have something like Alma
a program that translate a lot languages to a lot of other languages. It's fun to play with it!
We love the way C makes you think about all those little details like strings and bufsize and pointer math. It means we get to keep 0wning you, because you can't get it right.
Don't get me wrong; C is great for the kernel and other code that needs to be machine-layer portable. But with the gnome panel at 5 mb, apparently no one cares about writing tight code anymore. So if its not going to be small and fast, it might as well be secure and reliable.
Which C will never be.
It's all quite an easy debate really. Some people prefer higher level languages like Python, whereas some prefer lower level languages like C.
What's the difference? The amount of lines you need to write to get the same result.
It therefore goes that the more lines you need to write to get the same result, the more control you get over the program and the computer on which it is running. This means that programs in C can control the computer in better ways than programs written in Perl or Python.
A lot of programmers, like C programmers, think that C, much like Ada, a language to program, in on problems such as objective and the logical ones. An interesting example is the difference between Visual Basic and Visual C++.
In Visual C++, to open a window takes about 104 lines of code if you estimate the number without doing any research like myself. In Visual Basic, you can open a window just by creating a new project and hitting 'Run'. It's easy, and that's why it works.
This is primarily true in the first instance, since there is proof that indicates such, although there is no evidence of this to suggest quasi-otherwise.
mogorific carpentry experiments
actually an old colleague of mine had the opinion that functional languages weren't _inherently_ more productive, but _did_ tend to attract programmers who understood abstraction at a deep level.
these guys can write good code in _any_ language (he was a scheme hacker who was busy optimising HAIRY C gc code), but are attracted to functional langs because such langs directly capture the abstractions these guys use.
so, to paint with a broad brush, functional languages aren't nec. better than imperative, but the functional paradigm (abstraction, genericity, focussing on data rather than process) IS.
Functional programming eh?
I'd suggest the following three languages:
1. SML
SML is the language on which OCaml is based. OCaml is really just SML with different (read: worse) syntax, some small differences, and then OO support.
SML will probably be easier to start off on, is better supported and better documented.
Once you've got SML down, OCaml will be easy.
SML is strongly-typed, via type-inference.
2. Common Lisp
This is probably the most powerful language in existance.
Functional if you want. Side-effects if you want. Based on mathematical theory. Closure of data and code. With CLOS (builtin) you get an incredibly powerful OO system.
Common Lisp is dynamically typed and CLOS supports dynamic multiple-dispatch for typing.
Lisp's defmacro system will open your eyes to a whole new world. It is the most powerful macro system you'll ever use. You can perform arbitrary transformations to your code. You'll never think the same way again once you've gotten the hang of defmacro.
3. Haskell
A very simple language to pick up the basics of. Pure functional. Lazy evaluation.
A different idea than SML or Lisp.
I think those three languages would expose you to pretty much all of the concepts of functional programming as well as all the different kinds of syntax you are likely to run across in functional languages.
If you have some time to read up on lambda calculus it might be worth it.
I also strongly recomment both of Paul Graham's Lisp books.
Good luck,
Justin Dubs