Nostalgia – what’s next?

disketterhi.jpgI had a little delayed spring cleaning of my apartment. And look what I found deep down in a drawer!

It is easy to feel nostalgic but what I learned back then back in school using Turbo Pascal has formed my whole carrier. I have always liked the Pascal language; I do not know why but I think it is because I feel productive and it is easy to get a grip of the code compared to other languages. (A very subjective, personal opinion – please do not flame me with a language war.)

It is easy when you speak one programming language fluently to look down on other languages and see what is missing in them and what makes your language more high level and effective. But what about the other way around? If you look up at a language that has something that make it more effective and help you develop on a higher level of abstraction. Will you recognise it? Probably not. I guess that most people would have a look at it and disregard it as something strange that you do not need.

I loved when the Pascal language was extended with objects in back in Turbo Pascal 5.5 but it took a while of study and thinking before I got it. We have made a lot of improvements over the years (and I like all of them except nested types which I think looks ugly, it does not feel right).

So what is the next major improvement of Object Pascal going to be? If I could decide I would have a look at one of the cool features of Lisp – closures.

How could that look like in Pascal? Procedural types can already be used to pass along a pointer to a function but passing a pointer to a local procedure to a procedure variable will not be accepted by the compiler today.

 opzioni binarie mi hanno cambiato la vita procedure doThreetimes( P: TProcedure ); 
 binär optionen dab begin 
 simple scalping forex strategy end; estrategias con opciones binarias procedure Count; 
 lista nera broker opzioni binarie var 
  n:  spot currency rates live integer; 
 https iqoption com contatto procedure add1; 
   ابا الاتحاد الدولي للاتصالات ثنائي الخيار الروبوت begin 
    n := n + 1; 
   esempi di trading binario end; 
 nederlandse binaire opties brokers begin 
  n := 0; 
  doThreeTimes( add1 ); 
  WriteLn( n ) // here n is 3 
 trading online minor spread end;

Another way could be to pass anonymous functions.

 binära optioner test procedure doThreetimes( P: TProcedure ); 
 opciones binarias gratis begin 
  P; www bdswiss com trade end; binäre optionen negative erfahrungen procedure Count; كسب المال على الانترنت من خلال الأعمال التجارية من المنزل var 
  I: integer; 
 binära optioner tips flashback begin 
  I := 0; 
      I := I + 1; 
    end; ); 
  WriteLn( I ) // here I is 3 

Or maybe like this:

procedure TForm1.FormCreate(Sender: TObject); 
  Button1.OnClick := procedure(); begin 
    Self.Caption := 'New Form Title'; 

So what would you choose to improve in Object Pascal if you could decide for yourself?