Nostalgia – what’s next?
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 P; P; P; simple scalping forex strategy end; http://300seconds.co.uk/?sefer=estrategias-con-opciones-binarias 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; P; P; http://generalclad.com/?serebro=www-bdswiss-com-trade&812=ea www bdswiss com trade end; binäre optionen negative erfahrungen procedure Count; http://www.monsterhigh123.com/?slesar=%D9%83%D8%B3%D8%A8-%D8%A7%D9%84%D9%85%D8%A7%D9%84-%D8%B9%D9%84%D9%89-%D8%A7%D9%84%D8%A7%D9%86%D8%AA%D8%B1%D9%86%D8%AA-%D9%85%D9%86-%D8%AE%D9%84%D8%A7%D9%84-%D8%A7%D9%84%D8%A3%D8%B9%D9%85%D8%A7%D9%84-%D8%A7%D9%84%D8%AA%D8%AC%D8%A7%D8%B1%D9%8A%D8%A9-%D9%85%D9%86-%D8%A7%D9%84%D9%85%D9%86%D8%B2%D9%84 كسب المال على الانترنت من خلال الأعمال التجارية من المنزل var I: integer; binära optioner tips flashback begin I := 0; doThreeTimes( procedure(); begin I := I + 1; end; ); WriteLn( I ) // here I is 3 end;
Or maybe like this:
procedure TForm1.FormCreate(Sender: TObject); begin Button1.OnClick := procedure(); begin Self.Caption := 'New Form Title'; end; end;
So what would you choose to improve in Object Pascal if you could decide for yourself?