2011-06-10 14:10:47 +00:00
|
|
|
-----
|
|
|
|
isHidden: false
|
|
|
|
menupriority: 1
|
|
|
|
kind: article
|
2011-09-28 15:45:28 +00:00
|
|
|
created_at: 2011-09-28T12:21:41+02:00
|
2011-09-27 15:11:40 +00:00
|
|
|
title: Programming Language Experience
|
2011-06-10 14:10:47 +00:00
|
|
|
author_name: Yann Esposito
|
|
|
|
author_uri: yannesposito.com
|
2011-10-26 08:49:00 +00:00
|
|
|
tags:
|
|
|
|
- programming
|
|
|
|
- languages
|
|
|
|
- C
|
|
|
|
- C++
|
|
|
|
- Java
|
|
|
|
- haskell
|
|
|
|
- Logo
|
|
|
|
- Basic
|
2011-06-10 14:10:47 +00:00
|
|
|
-----
|
2012-04-26 15:53:19 +00:00
|
|
|
blogimage("dragon.jpg","Title image")
|
2011-06-10 14:10:47 +00:00
|
|
|
|
|
|
|
begindiv(intro)
|
2012-11-05 10:52:15 +00:00
|
|
|
%tldr My short and highly subjective feelings about the programming languages I used.
|
2011-06-10 14:10:47 +00:00
|
|
|
enddiv
|
|
|
|
|
2011-09-28 15:45:28 +00:00
|
|
|
### `BASIC`
|
2011-06-10 14:10:47 +00:00
|
|
|
|
2012-04-26 15:53:19 +00:00
|
|
|
leftblogimage("basic.gif","Title image")
|
|
|
|
|
2011-07-05 12:39:59 +00:00
|
|
|
The language of my firsts programs!
|
|
|
|
I was about 10, with an `MO5` and `Amstrad CPC 6128` and even with my `Atari STe`.
|
|
|
|
This is the language of `GOTO`s.
|
|
|
|
Ô nostalgia.
|
2011-09-06 06:59:30 +00:00
|
|
|
Unfortunately this might be the only interesting part of this language.
|
2011-07-05 12:39:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
Today this language is obsolescent.
|
2011-09-30 08:16:57 +00:00
|
|
|
It is not even good to learn programming.
|
|
|
|
I know some compiler exists now.
|
2011-07-05 12:39:59 +00:00
|
|
|
But this is not enough to try to learn it.
|
2011-06-10 14:10:47 +00:00
|
|
|
|
|
|
|
|
|
|
|
<code class="zsh">
|
|
|
|
READY
|
|
|
|
10 PRINT "HELLO WORLD!"
|
|
|
|
20 GOTO 10
|
|
|
|
RUN
|
|
|
|
</code>
|
|
|
|
|
2011-09-30 08:16:57 +00:00
|
|
|
I also remember I copied some game source code from some magazine.
|
2011-07-05 12:39:59 +00:00
|
|
|
Most lines were like:
|
2011-06-10 14:10:47 +00:00
|
|
|
|
|
|
|
<code class="zsh">
|
|
|
|
3110 DATA FA,01,FF,FF,FF,FF,00,23,22,43,DA,DE,EE,FF,FF,FF,00,03,4A,F2
|
|
|
|
</code>
|
|
|
|
|
2011-07-05 12:39:59 +00:00
|
|
|
What a pleasure!
|
2011-06-10 14:10:47 +00:00
|
|
|
|
|
|
|
### Logo
|
|
|
|
|
2012-04-26 15:53:19 +00:00
|
|
|
leftblogimage("dragon.jpg","Dragon fractal")
|
|
|
|
|
2012-11-05 10:52:15 +00:00
|
|
|
I was about 10 when I played with logo to draw things on a screen.
|
2011-07-05 12:39:59 +00:00
|
|
|
|
|
|
|
I remember the Bach's music while the program loaded.
|
2011-06-10 14:10:47 +00:00
|
|
|
|
2012-09-13 10:48:56 +00:00
|
|
|
At that time we had to load the program into the memory using tapes.
|
2011-09-30 08:16:57 +00:00
|
|
|
This one was a rare one. It didn't made an awfull 'Krrrkrr cssssss krrr' noise.
|
2011-06-10 14:10:47 +00:00
|
|
|
|
2011-09-30 08:16:57 +00:00
|
|
|
Some years after, I used it to learn programming to my college student.
|
2012-11-05 10:52:15 +00:00
|
|
|
It was a really good first language.
|
2011-07-05 12:39:59 +00:00
|
|
|
Making fractals is like a game for children.
|
2011-06-10 14:10:47 +00:00
|
|
|
|
2012-11-05 10:52:15 +00:00
|
|
|
Here is the code to draw the dragon fractal:
|
2011-06-10 14:10:47 +00:00
|
|
|
|
|
|
|
<code class="zsh">
|
|
|
|
HIDETURTLE
|
|
|
|
|
|
|
|
PENUP
|
|
|
|
SETXY -200 0
|
|
|
|
RIGHT 90
|
|
|
|
PENDOWN
|
|
|
|
|
|
|
|
to dragon :degree :size
|
|
|
|
setpensize 1
|
2011-07-05 12:39:59 +00:00
|
|
|
if :size>5 [setpensize 2]
|
2011-06-10 14:10:47 +00:00
|
|
|
if :size>10 [setpensize 3]
|
|
|
|
if :size>20 [setpensize 4]
|
|
|
|
if :size>40 [setpensize 5]
|
2012-09-13 10:48:56 +00:00
|
|
|
ifelse :degree=0 [
|
|
|
|
fd :size
|
2011-07-05 12:39:59 +00:00
|
|
|
][
|
|
|
|
left 45 dragon (:degree-1) (size/4)
|
|
|
|
right 90 dragon (:degree-1) (size/2)
|
|
|
|
left 90 dragon (:degree-1) (size/4)
|
|
|
|
right 45
|
2011-06-10 14:10:47 +00:00
|
|
|
]
|
|
|
|
end
|
|
|
|
|
|
|
|
dragon 6 3000
|
|
|
|
</code>
|
|
|
|
|
2011-07-05 12:39:59 +00:00
|
|
|
### Pascal
|
|
|
|
|
2012-11-05 10:52:15 +00:00
|
|
|
The eternal second.
|
2011-07-05 12:39:59 +00:00
|
|
|
|
|
|
|
I made my firsts real serious program with Pascal.
|
2011-09-30 08:16:57 +00:00
|
|
|
I must confess I find it inferior to C.
|
|
|
|
I made graph algorithms, sort algorithms even some IA (genetic) algorithms.
|
2011-07-05 12:39:59 +00:00
|
|
|
In the end I prefer C.
|
|
|
|
|
|
|
|
|
|
|
|
### C
|
|
|
|
|
2012-04-26 15:53:19 +00:00
|
|
|
leftblogimage("C.jpg","Pointer representation from Dancing links")
|
2011-09-28 15:45:28 +00:00
|
|
|
|
2011-09-30 08:16:57 +00:00
|
|
|
The pointer's language.
|
2011-07-05 12:39:59 +00:00
|
|
|
|
|
|
|
_Le_ programming language.
|
|
|
|
|
2012-11-05 10:52:15 +00:00
|
|
|
Once you understand loops and recursion,
|
|
|
|
it is time to do serious things.
|
|
|
|
If you want to make good quality code, knowing C is almost mandatory.
|
2011-07-05 12:39:59 +00:00
|
|
|
|
2012-11-05 10:52:15 +00:00
|
|
|
This language is close to the machine language.
|
2011-07-05 12:39:59 +00:00
|
|
|
So much, there is (mostly) a linear relation between the size of your code and the size of the compiled one.
|
|
|
|
|
|
|
|
In short, each time you write a C instruction there won't be anything strange that will occurs, like starting a long algorithm behind the scene.
|
|
|
|
|
2012-11-05 10:52:15 +00:00
|
|
|
While close to the machine, `C` keep sufficient abstractions to be fun.
|
2011-07-05 12:39:59 +00:00
|
|
|
|
|
|
|
I made a lot of program with it.
|
2012-11-05 10:52:15 +00:00
|
|
|
From sort algorithms to AI ones (SAT3), system, network programming, etc...
|
2012-09-13 10:48:56 +00:00
|
|
|
It is a very useful language that will help you understand how things works on your computer.
|
|
|
|
Most modern computer language hide a lot of informations on what occurs.
|
2012-11-05 10:52:15 +00:00
|
|
|
This is not the case with `C`.
|
2011-07-05 12:39:59 +00:00
|
|
|
|
|
|
|
### ADA
|
|
|
|
|
2012-11-05 10:52:15 +00:00
|
|
|
The "super clean" one.
|
2011-07-05 12:39:59 +00:00
|
|
|
|
|
|
|
I liked ADA. I must confess I didn't used it a lot.
|
|
|
|
May be one day I will try it again.
|
|
|
|
I was impressed by asynchronous programming with it.
|
|
|
|
What you need to know is this old language had certainly inspired most new object oriented languages.
|
|
|
|
|
|
|
|
## Object Oriented Languages
|
|
|
|
|
2011-09-30 08:16:57 +00:00
|
|
|
Until here I just described imperative languages without any object notion.
|
2011-06-10 14:10:47 +00:00
|
|
|
|
2011-07-05 12:39:59 +00:00
|
|
|
More clearly, the language didn't helped you to structure your program.
|
2011-06-10 14:10:47 +00:00
|
|
|
|
2011-09-30 08:16:57 +00:00
|
|
|
In order to limit the number of bugs, particularly for huge programs, we started to think about how to organize computer programs.
|
2012-11-05 10:52:15 +00:00
|
|
|
In the end, from the imperative language culture, it produced the Object Oriented programming (OOP).
|
|
|
|
Beware, the Object Oriented programming isn't a miracle. Proof? How many bug free software do you use?
|
2011-07-05 12:39:59 +00:00
|
|
|
Furthermore, OOP doesn't fit all problems.
|
2012-11-05 10:52:15 +00:00
|
|
|
But to make a bank application, an application which help to manage stock, clients or text archives or more generally
|
|
|
|
an information system, the OOP is not so bad.
|
2011-06-10 14:10:47 +00:00
|
|
|
|
|
|
|
|
2011-07-05 12:39:59 +00:00
|
|
|
Then Object Oriented Languages appeared everywhere.
|
2011-06-10 14:10:47 +00:00
|
|
|
|
2011-07-05 12:39:59 +00:00
|
|
|
### C++
|
|
|
|
|
2012-04-26 15:53:19 +00:00
|
|
|
leftblogimage("cplusplus.jpg","Messy router")
|
2011-09-28 15:45:28 +00:00
|
|
|
|
2011-07-05 12:39:59 +00:00
|
|
|
The ugly
|
|
|
|
|
2011-09-30 08:16:57 +00:00
|
|
|
Industry wanted an Object Oriented Language without losing all their old C code.
|
2011-07-06 21:17:54 +00:00
|
|
|
Solution, keep C and add an Object layer on it.
|
2012-11-05 10:52:15 +00:00
|
|
|
My main concern about C++ is: it does too many things.
|
2011-09-30 08:16:57 +00:00
|
|
|
I appreciated multiple inheritance and templates.
|
2012-09-13 10:48:56 +00:00
|
|
|
In reality I liked a lot C++ while I was working alone.
|
2011-07-06 21:17:54 +00:00
|
|
|
I used it to write `DEES` my main thesis software.
|
|
|
|
My only concern was about a lack in the STL.
|
2012-09-13 10:48:56 +00:00
|
|
|
In the doc, one could use `String<T>`.
|
2012-11-05 10:52:15 +00:00
|
|
|
But in reality, `T` had to be only `char` or `char16`.
|
2011-09-28 15:45:28 +00:00
|
|
|
Then I had to reduce my alphabet to 2<sup>16</sup> letters.
|
2011-07-06 21:17:54 +00:00
|
|
|
Except for some application, the alphabet must be far larger than that.
|
2012-09-13 10:48:56 +00:00
|
|
|
en:
|
2011-09-28 15:45:28 +00:00
|
|
|
To conclude, I'd say, C++ is very good if you work alone or with a fixed subset of its features.
|
|
|
|
|
2012-11-05 10:52:15 +00:00
|
|
|
fr:
|
|
|
|
|
2011-07-05 12:39:59 +00:00
|
|
|
|
|
|
|
### Eiffel
|
|
|
|
|
2012-04-26 15:53:19 +00:00
|
|
|
leftblogimage("eiffel.jpg","Eiffel tower construction")
|
2011-09-28 15:45:28 +00:00
|
|
|
|
2012-09-13 10:48:56 +00:00
|
|
|
Yes, it is a really nice language.
|
2011-07-06 21:17:54 +00:00
|
|
|
Full object in mind. Far cleaner than C++.
|
|
|
|
But it isn't so popular.
|
|
|
|
Behind C++ there is a large community to help new users and to write libraries.
|
|
|
|
Furthermore, I preferred working with C++.
|
2012-11-05 10:52:15 +00:00
|
|
|
When I learned Eiffel, I programmed a lot with C and liked its syntax.
|
|
|
|
|
2011-07-05 12:39:59 +00:00
|
|
|
|
|
|
|
### Java
|
|
|
|
|
2012-04-26 15:53:19 +00:00
|
|
|
leftblogimage("grail.jpg","Holy Grail from the Monty Python")
|
2011-09-28 15:45:28 +00:00
|
|
|
|
2011-07-06 21:17:54 +00:00
|
|
|
The first time I heard about Java it was _le Grail_!
|
2011-07-05 12:39:59 +00:00
|
|
|
|
2012-11-05 10:52:15 +00:00
|
|
|
|
2012-09-13 10:48:56 +00:00
|
|
|
Perfect portability, your program will work on all platform.
|
2012-11-05 10:52:15 +00:00
|
|
|
The language helps limit mistakes, and force you to use good programming habits.
|
|
|
|
But...
|
|
|
|
|
2011-06-10 14:10:47 +00:00
|
|
|
|
2012-09-13 10:48:56 +00:00
|
|
|
But It is extremely verbose.
|
2012-11-05 10:52:15 +00:00
|
|
|
Many limitations are quite boring if you know what you're doing.
|
2011-06-10 14:10:47 +00:00
|
|
|
|
2012-09-13 10:48:56 +00:00
|
|
|
For example, there is no multiple inheritance.
|
2011-09-28 15:45:28 +00:00
|
|
|
Generally it is a coherent choice when there are a way to compensate.
|
|
|
|
In Java, there are interfaces for this.
|
|
|
|
Except, interfaces can only add methods to a class.
|
|
|
|
You cannot add any attribute to a class except by subclassing.
|
|
|
|
I really lacked this feature.
|
|
|
|
|
2012-11-05 10:52:15 +00:00
|
|
|
|
2011-07-06 21:17:54 +00:00
|
|
|
I made a GUI using Java Swing and I created my own notification system between different element of the GUI.
|
2012-11-05 10:52:15 +00:00
|
|
|
In the beginning I only needed to send notification one to one.
|
|
|
|
After some time, I wanted to send one to many notifications.
|
|
|
|
I had to make a bunch of copy/paste inside all my subclasses!
|
2011-09-28 15:45:28 +00:00
|
|
|
Copy/paste are exactly what should be avoided the most by object oriented languages.
|
2011-07-05 12:39:59 +00:00
|
|
|
|
2011-09-30 08:16:57 +00:00
|
|
|
Another thing: threads.
|
2012-11-05 10:52:15 +00:00
|
|
|
I was forced to make my own thread management system to avoid locks and send notifications between threads (wait the end of this thread, ...).
|
2011-07-06 21:17:54 +00:00
|
|
|
At that time I used Java 1.5.
|
2011-09-30 08:16:57 +00:00
|
|
|
This problem should have been solved with Java 1.6.
|
2011-07-06 21:17:54 +00:00
|
|
|
I wish it is the case, but lacking such an essential feature for a language was very bad.
|
2011-06-10 14:10:47 +00:00
|
|
|
|
2012-11-05 10:52:15 +00:00
|
|
|
In the same idea, it was very long to wait for the "foreach" loops.
|
2011-06-10 14:10:47 +00:00
|
|
|
|
2011-07-06 21:17:54 +00:00
|
|
|
After my experience, I don't recommend Java.
|
|
|
|
Portability does not worth this price.
|
2011-06-10 14:10:47 +00:00
|
|
|
|
2012-11-05 10:52:15 +00:00
|
|
|
GUI portability means mediocre experience on all platforms.
|
2011-09-28 15:45:28 +00:00
|
|
|
Any system it might be (wxWidget, QT, etc...).
|
2011-06-10 14:10:47 +00:00
|
|
|
|
2012-11-05 10:52:15 +00:00
|
|
|
The Java ideology is "closed".
|
|
|
|
But it resolve a big problem.
|
|
|
|
It helps medium to low quality developers to work in team without the ability to make too much harm to the product.
|
|
|
|
A good programmer will be able to make very interesting things with it thought.
|
2011-09-28 15:45:28 +00:00
|
|
|
Please note I didn't say Java programmer are bad programmer.
|
|
|
|
|
2011-06-10 14:10:47 +00:00
|
|
|
|
2011-07-05 12:39:59 +00:00
|
|
|
### Objective-C
|
|
|
|
|
2012-04-26 15:53:19 +00:00
|
|
|
leftblogimage("xcode_logo.png","Xcode Logo")
|
2011-09-28 15:45:28 +00:00
|
|
|
|
2011-07-06 21:17:54 +00:00
|
|
|
The language I learned and used only to make application on Apple(c) platform.
|
|
|
|
I learned Objective-C just after Python.
|
|
|
|
It was hard to do it.
|
|
|
|
At first I didn't liked the syntax and many other details.
|
2012-11-05 10:52:15 +00:00
|
|
|
But it is this kind of language the more you use, the more you like.
|
2011-07-06 21:17:54 +00:00
|
|
|
In fact, Objective-C is a simple language, but associated with the Cocoa framework it is a really good tool.
|
2012-09-13 10:48:56 +00:00
|
|
|
Cocoa is very different to other framework I used before.
|
2012-11-05 10:52:15 +00:00
|
|
|
I find many of its idea extremely good.
|
2011-07-06 21:17:54 +00:00
|
|
|
Both simple and efficient.
|
2012-11-05 10:52:15 +00:00
|
|
|
It might seems like small details on paper, but once you start using it, it makes all the difference.
|
2011-07-05 12:39:59 +00:00
|
|
|
|
2012-09-13 10:48:56 +00:00
|
|
|
Even if Objective-C is a relatively low level language.
|
2011-07-06 21:17:54 +00:00
|
|
|
Its dynamic typing ability make it very good for GUI programming.
|
2012-11-05 10:52:15 +00:00
|
|
|
I recommend to continue working with this language.
|
|
|
|
In the end you'll certainly find it better than expected.
|
2011-06-10 14:10:47 +00:00
|
|
|
|
2011-07-06 21:17:54 +00:00
|
|
|
## Modern Scripting Languages
|
2011-06-10 14:10:47 +00:00
|
|
|
|
2011-07-05 12:39:59 +00:00
|
|
|
### PHP
|
|
|
|
|
2012-04-26 15:53:19 +00:00
|
|
|
leftblogimage("php.jpg","A Jacky Touch Car")
|
2011-09-28 15:45:28 +00:00
|
|
|
|
2011-07-06 21:17:54 +00:00
|
|
|
This small script language that we used all to make our website in the time of animated gifs.
|
2011-06-10 14:10:47 +00:00
|
|
|
|
2012-11-05 10:52:15 +00:00
|
|
|
Nice but no more.
|
|
|
|
Apparently there were a lot of progress since PHP5.
|
|
|
|
Maybe one day I'll use it again.
|
|
|
|
But behind it, this language has a "script kiddies only" reputation.
|
2011-09-28 15:45:28 +00:00
|
|
|
Also long history of easy to make security holes.
|
2011-07-05 12:39:59 +00:00
|
|
|
|
2012-09-13 10:48:56 +00:00
|
|
|
In reality PHP is just behind C for the abstraction level.
|
2011-07-06 21:17:54 +00:00
|
|
|
Therefore it has a lot of organisation problems and make it easier to create bugs.
|
|
|
|
For web applications it is a real problem.
|
2011-07-05 12:39:59 +00:00
|
|
|
|
2011-07-06 21:17:54 +00:00
|
|
|
PHP remains for me the SQL injection language.
|
2012-11-05 10:52:15 +00:00
|
|
|
I made a bit of PHP not so long ago, and it was a pain to protect my application to SQL injection.
|
|
|
|
Yep, I didn't found any standard library to make this, but I didn't searched a lot.
|
2011-07-05 12:39:59 +00:00
|
|
|
|
|
|
|
### Python
|
|
|
|
|
2012-04-26 15:53:19 +00:00
|
|
|
leftblogimage("python.jpg","Python. Do you speak it?")
|
2011-09-28 15:45:28 +00:00
|
|
|
|
2011-07-06 21:17:54 +00:00
|
|
|
Revelation!
|
2011-06-10 14:10:47 +00:00
|
|
|
|
2011-07-06 21:17:54 +00:00
|
|
|
When you were used to work with compiled languages (C++, Java) and you start learning Python, it's like a punch in the face.
|
|
|
|
Programming like it always should have been.
|
|
|
|
Everything is natural, it's _magic_.
|
|
|
|
Yes, as good as this.
|
|
|
|
But something so good must have some drawback.
|
2011-07-05 12:39:59 +00:00
|
|
|
|
2011-09-28 15:45:28 +00:00
|
|
|
And yes, like all interpreted languages, Python is _slow_.
|
2011-07-06 21:17:54 +00:00
|
|
|
Beware, no just a bit slow like 2 or 3 times slower than C. (like Java for example).
|
|
|
|
No, really slow, about 10 to 20 times slower than C.
|
2011-09-28 15:45:28 +00:00
|
|
|
Argh... Note it is completely usable for many things.
|
2011-06-10 14:10:47 +00:00
|
|
|
|
2011-07-06 21:17:54 +00:00
|
|
|
### Awk
|
2011-06-10 14:10:47 +00:00
|
|
|
|
2011-07-06 21:17:54 +00:00
|
|
|
If you have to "filter" some files and the filter is not too complicated awk is the ideal language to do this.
|
2012-09-13 10:48:56 +00:00
|
|
|
For example, if you want to know which words in a text file are most used.
|
|
|
|
I used it to modify hundreds of XML files in an easier manner than XSLT.
|
2011-06-10 14:10:47 +00:00
|
|
|
|
|
|
|
|
2011-07-06 21:17:54 +00:00
|
|
|
### Perl
|
2011-06-10 14:10:47 +00:00
|
|
|
|
2011-07-06 21:17:54 +00:00
|
|
|
Perl is magic, but the syntax is so hideous nobody can like to work in an environment with many different person in Perl.
|
2012-11-05 10:52:15 +00:00
|
|
|
Or at least, all other collaborators must be excellent programmers.
|
|
|
|
A great feature of perl is its integration with regular expression in its syntax:
|
2011-06-10 14:10:47 +00:00
|
|
|
|
|
|
|
|
2011-07-06 21:17:54 +00:00
|
|
|
<code class="perl">
|
2011-09-30 12:56:56 +00:00
|
|
|
$var =~ s/toto/titi/g
|
2011-07-06 21:17:54 +00:00
|
|
|
</code>
|
2011-06-10 14:10:47 +00:00
|
|
|
|
2012-11-05 10:52:15 +00:00
|
|
|
This program will replace every `toto` by `titi` inside the `$var` variable.
|
|
|
|
The Perl code is often very compact and generally unreadable.
|
2011-07-06 21:17:54 +00:00
|
|
|
But it is a language good to know.
|
|
|
|
It is a kind of `awk` under steroids.
|
|
|
|
|
|
|
|
### Ruby
|
|
|
|
|
2012-11-05 10:52:15 +00:00
|
|
|
Ruby is a very good language.
|
|
|
|
It is often compared (opposed ?) to Python.
|
2011-07-06 21:17:54 +00:00
|
|
|
There are the regular expression operators Perl inside the langage.
|
|
|
|
But the syntax is extremely clear, like in Python.
|
2012-11-05 10:52:15 +00:00
|
|
|
Many feature were inspired by functional programming (as in Python).
|
2011-07-06 21:17:54 +00:00
|
|
|
I used it a lot.
|
|
|
|
It is the worst language I know in term of efficiency.
|
|
|
|
This is the language that lose almost all benchmarks.
|
|
|
|
But it is the perfect tool for prototypes.
|
|
|
|
If you want to make a website prototype, RoR (Ruby on Rails) is certainly one of the best system known to mankind.
|
2012-11-05 10:52:15 +00:00
|
|
|
From idea to realisation, few time will occur.
|
|
|
|
Make this site work for thousands of people, will, on the other hand, certainly require a lot of optimisations.
|
|
|
|
|
|
|
|
One of the greatest Ruby feature is its ability to make the program extremely readable.
|
|
|
|
It is very close to natural language.
|
|
|
|
On the other hand, I found the Object Oriented layer a bit disappointing.
|
|
|
|
The fact there is no real "class variable" but only "tree class variable" for example.
|
|
|
|
|
|
|
|
Considering the community, the ruby one feels closer to the creative than the engineer.
|
|
|
|
I am under the impression designer tends to use Ruby instead of Python.
|
2011-07-06 21:17:54 +00:00
|
|
|
|
|
|
|
### Javascript
|
|
|
|
|
|
|
|
It is the good surprise.
|
2012-09-13 10:48:56 +00:00
|
|
|
During years, javascript was considered as an annoying web experience language.
|
2011-07-06 21:17:54 +00:00
|
|
|
In reality, javascript has many really good qualities.
|
|
|
|
Particularly, it is easy to pass a function in parameter and to create anonymous functions (closures).
|
|
|
|
Recently, javascript became far faster than before and many frameworks and libraries appears:
|
|
|
|
|
|
|
|
- Cappuccino, Objective-J (as in objective-C but with javascript)
|
|
|
|
- Sproutcore
|
|
|
|
- Spine.js
|
|
|
|
- Backbone.js
|
|
|
|
- jQuery
|
|
|
|
- prototype.js
|
|
|
|
|
|
|
|
Particularly with jQuery we can chain functions.
|
|
|
|
It is very nice to use.
|
|
|
|
As I said, this is a good surprise.
|
|
|
|
Javascript was chosen by chance as the script inside your navigator.
|
|
|
|
Instead of the java inspired syntax, everything else is very good.
|
2012-11-05 10:52:15 +00:00
|
|
|
In order to compensate the syntax, you can use CoffeeScript.
|
2011-07-06 21:17:54 +00:00
|
|
|
|
|
|
|
## Functional Languages
|
|
|
|
|
|
|
|
### CamL
|
|
|
|
|
2011-09-28 15:45:28 +00:00
|
|
|
I learned CamL during the college.
|
2012-11-05 10:52:15 +00:00
|
|
|
It was really interesting.
|
2011-09-28 15:45:28 +00:00
|
|
|
Functional programming is very different to imperative programming (most of popular languages).
|
|
|
|
I had good mathematic intuitions to use this language.
|
|
|
|
But I must confess I never used it for something serious.
|
2011-07-06 21:17:54 +00:00
|
|
|
|
|
|
|
### Haskell
|
|
|
|
|
2012-11-05 10:52:15 +00:00
|
|
|
I believe I will still learning this language in many years.
|
2011-07-06 21:17:54 +00:00
|
|
|
I must say it is a pleasure.
|
2011-09-28 15:45:28 +00:00
|
|
|
Generally it takes me no more than some hours to some days to learn a new programming language.
|
2012-11-05 10:52:15 +00:00
|
|
|
Concerning Haskell, this is very different.
|
|
|
|
To master Haskell you need to understand very abstract concepts.
|
2012-09-13 10:48:56 +00:00
|
|
|
Monads and Arrows are some of them.
|
2012-11-05 10:52:15 +00:00
|
|
|
I didn't understood them before I read some scientific paper.
|
2011-09-28 15:45:28 +00:00
|
|
|
Many week will be necessary to master it perfectly (if someone does).
|
2012-11-05 10:52:15 +00:00
|
|
|
Also the community is very friendly and nice.
|
|
|
|
There is no "LOL! URAN00B! RTFM!"
|
2012-09-13 10:48:56 +00:00
|
|
|
And no concession has been made to make this language more popular (I'm looking at you C++, Java and Javascript).
|
2011-09-28 15:45:28 +00:00
|
|
|
This langage remain pure (I know there are two meaning).
|
2011-07-06 21:17:54 +00:00
|
|
|
|
2012-11-05 10:52:15 +00:00
|
|
|
Concerning making real product with Haskell.
|
|
|
|
In fact, Haskell is very efficient concerning code change.
|
|
|
|
Refactoring code is incredibly easy with Haskell.
|
|
|
|
And in the same time, the Haskell type system helps to make your product bug free.
|
|
|
|
|
|
|
|
Technically this language is close to perfection.
|
|
|
|
But it has some major problems:
|
|
|
|
|
|
|
|
- not so popular
|
|
|
|
- hard to learn
|
|
|
|
- I also believe there is not actually enough success stories with Haskell
|
|
|
|
|
|
|
|
On the other hand, knowing Haskell will help you learn a lot of thing about programming in general.
|
|
|
|
You should at least take a look.
|
|
|
|
[I made an Haskell introduction if you are curious](/Scratch/en/blog/Haskell-the-Hard-Way/).
|
|
|
|
|
2011-07-06 21:17:54 +00:00
|
|
|
## Unpopular Languages
|
|
|
|
|
2011-09-28 15:45:28 +00:00
|
|
|
### Metapost
|
2011-07-06 21:17:54 +00:00
|
|
|
|
|
|
|
Metapost is a language to program drawings.
|
2012-09-13 10:48:56 +00:00
|
|
|
What make metapost very good?
|
2011-07-06 21:17:54 +00:00
|
|
|
It contains a linear solver.
|
2011-09-28 15:45:28 +00:00
|
|
|
This is really useful to draw things.
|
2011-07-06 21:17:54 +00:00
|
|
|
For example if you write:
|
|
|
|
|
|
|
|
<code class="ruby">
|
2011-09-28 15:45:28 +00:00
|
|
|
AA=1/3[A,B]
|
2011-07-06 21:17:54 +00:00
|
|
|
</code>
|
2011-06-10 14:10:47 +00:00
|
|
|
|
2011-09-28 15:45:28 +00:00
|
|
|
It will place the point `AA` between the point `A` and `B`.
|
|
|
|
More precisely at the barycenter `(2xA + B)/3`.
|
|
|
|
|
|
|
|
<code class="ruby">
|
|
|
|
X=whatever[A,B]
|
|
|
|
X=whatever[C,D]
|
|
|
|
</code>
|
|
|
|
|
|
|
|
This second example, will place the point X at the intersection of the two segments `AB` and `CD`.
|
|
|
|
|
2012-09-13 10:48:56 +00:00
|
|
|
This feature is very helpful, and not only to draw things.
|
2011-09-28 15:45:28 +00:00
|
|
|
Most programming language should think about adding it.
|
2011-06-10 14:10:47 +00:00
|
|
|
|
2012-09-13 10:48:56 +00:00
|
|
|
### zsh
|
2011-06-10 14:10:47 +00:00
|
|
|
|
2011-07-06 21:17:54 +00:00
|
|
|
Yes, zsh is a shell.
|
2012-11-05 10:52:15 +00:00
|
|
|
But it is also a script language very well suited to file management.
|
|
|
|
For now, it is the best shell I used.
|
|
|
|
I prefer zsh to bash.
|
2011-06-10 14:10:47 +00:00
|
|
|
|
2011-07-06 21:17:54 +00:00
|
|
|
### Prolog
|
2011-06-10 14:10:47 +00:00
|
|
|
|
2012-09-13 10:48:56 +00:00
|
|
|
I never made something serious with Prolog, but I really loved to use and learn it.
|
2011-09-28 15:45:28 +00:00
|
|
|
I had the chance to learn Prolog with [Alain Colmerauer](http://alain.colmerauer.free.fr/) himself.
|
2011-07-06 21:17:54 +00:00
|
|
|
This language try to resolve constraints as much as it can.
|
2011-09-28 15:45:28 +00:00
|
|
|
It has a magic feeling when you use it.
|
2011-07-06 21:17:54 +00:00
|
|
|
We only write constraints, we never put order.
|
2011-09-28 15:45:28 +00:00
|
|
|
A bit like functional programming but far more powerful.
|
2011-06-10 14:10:47 +00:00
|
|
|
|
2011-07-06 21:17:54 +00:00
|
|
|
## Languages to discover
|
2011-06-10 14:10:47 +00:00
|
|
|
|
2011-09-28 15:45:28 +00:00
|
|
|
Many languages and framework remains to be learnt and tried.
|
2012-11-05 10:52:15 +00:00
|
|
|
Actually I believe I will stay a while with Haskell.
|
2011-09-28 15:45:28 +00:00
|
|
|
Maybe tomorrow I will look at LISP, Scala or Erlang.
|
2011-07-06 21:17:54 +00:00
|
|
|
I also certainly look at clojure to make web application.
|
2011-06-10 14:10:47 +00:00
|
|
|
|
2011-07-06 21:17:54 +00:00
|
|
|
Tell me if you have any other experience with these programming languages.
|
2011-09-28 15:45:28 +00:00
|
|
|
Of course, my feelings are highly subjectives.
|
|
|
|
But I used all of these languages.
|
|
|
|
|
|
|
|
|
|
|
|
*[STL]: Standard Tempate Library
|
|
|
|
*[GUI]: Graphic User Interface
|