4 ms·
Object Pascal is a nice language and it's terse (it's surface is quite small). In a lot of ways it feels like a forerunner of C# (unsurprising as the lead on T
by noir_lord 8y ago
Object Pascal is a nice language and it's terse (it's surface is quite small).
In a lot of ways it feels like a forerunner of C# (unsurprising as the lead on Turbo Pascal/Object Pascal was Anders Hejlsberg).
I loved Delphi 6, still miss it in some ways.
- pjmlp 8y agoFrom the early days I thought it was a mistake for Java and .NET not to follow on what was common back then, and offer AOT compilation out of the box. Java AOT solutions were all commercial (gcj doesn't really count) and .NET had NGEN, but it was only meant for fast startups. .NET was specially disappointing in this regard, given that it had quite some influences from Delphi. We had to wait around 20 years for AOT to start being part of the default toolchains. Had it been there from the start, including proper value and unsigned types in Java, and maybe there would be much less software written in C and C++.
- noir_lord 8y agoIndeed, Object Pascal in Delphi 6 had blazing fast compilation (for various reasons not least it's unit system), like click and it runs a half second later on a 250,000 line codebase.
- pjmlp 8y agoA tradition all the way back to its MS-DOS early life. Turbo Pascal 5.5 had an advertised compilation speed of 34 000 lines/minute, on 1989's hardware. http://edn.embarcadero.com/article/20803 http://edn.embarcadero.com/article/20803 So something like PC 386 running MS-DOS 4.x, real mode with 640KB, eventually 1MB, if making use of highmem. So excuse me for not being that amazed with Go's compilation speed achievements. :)
- jstimpfle 8y agoWhat's the reference speed for golang or generally a quick compiler on contemporary hardware? My own experimental non-optimizing compiler compiles >1M lines per second, and it's not even optimized or multithreaded. Currently quite happy about that :-)
- atombender 8y agoThe original Turbo/Borland Pascal compiler was a single-pass compiler written in assembly. Not sure if they ever rewrote it in a high-level language. The small, simple grammar helped, as did the unit system. With Delphi, linking became the most expensive stage of compilation. Part of being single-pass was it hardly did any optimizations, and of course declaration order was completely rigid. Back in the 1990s there were competing commercial compilers like Stony Brook Pascal that did optimization, and at the time there were optimizers that you could run on the .exe files, but for the most part people stuck to Borland's tools. I spend a good part of the 90s writing fast 2D and 3D graphics stuff, including a commercial game, and performance was never an issue, especially as Object Pascal supported embedding assembly blocks seamlessly into your code.
- pjmlp 8y agoIf I am not mistaken, later versions of Delphi removed the restrictions on declaration order. I am with you on performance for graphics stuff, hence why I never bought into stuff like disabling bounds checking on the whole application is a must for performance.
- atombender 8y agoI stopped using Delphi after version 4, but I was curious, so I did some googling. Looks to me like forward declarations were still needed in Delphi 2010, at least for class declarations: https://stackoverflow.com/questions/2137030/cant-get-a-forward-class-declaration-to-work-in-delphi-2010 https://stackoverflow.com/questions/2137030/cant-get-a-forwa.... Borland's Pascal compilers did have a way to disable bounds checking locally, with a special compiler directive comment: {$R-}. It took effect from where you used it, so you could do: {$R-} for i := 1 to 10 do writeln(myArray[i]); end; {$R+} </nostalgia>
- pjmlp 8y agoYep I used R- a few times, just not everywhere. :) Thanks for googling it.
- mhd 8y agoI think one of the reasons why new languages are going for compilation again is the death of the multi-architecture ecosystem. Support x64 and ARM and you can play with the big boys. Back then? Intel was barely considered mature, every Unix manufacturer (including sun) had their own processor architecture, and who knew what was coming out for the smaller devices ("thin clients" were all the rage). I still think that for those scenarios Sun should've stuck with PostScript, and we still might have C/C++, but would be spared JS/HTML/CSS. I've got no idea why Microsoft was going apesh* for bytecode all of a sudden. Especially considering that they had the heads of Modula-3 and Delphi...
- narag 8y agoI've got no idea why Microsoft was going apesh· for bytecode all of a sudden. Delphi probably was one of the main reasons. It was a lot better for Windows 32 development than VB and there were projects to port it to Linux. Microsoft then recruited Delphi leads, settled a long running suit with Borland (with the fallout of stopping Delphi for Linux development) and finally created a platform where they keep control, unlike native API that is much more open.
- pjmlp 8y agoJava was the reason. COM Runtime was going to be native (Ext-VOS), but then they decided to go VM path and .NET was born. https://blogs.msdn.microsoft.com/dsyme/2012/07/05/more-c-net-generics-research-project-history-the-msr-white-paper-from-mid-1999/ https://blogs.msdn.microsoft.com/dsyme/2012/07/05/more-c-net... If you read Don Syme blog entries about .NET history, you will see a few similarities with WinRT. Just with .NET metadata instead of the old COM type libraries. So the double bet on COM since Vista was a bit like WinDev's revenge. However how things turned out, it appears DevTools is having their way again and even .NET Native might be redone post .NET Core 3.0 release, as per Q&A session at Connect() 2018.
- narag 8y agoI can't find anything in the post you link that supports your conclusion. The author seems to be a person from the research area, in the team for F# maybe? Who do you think had more weight in the decision, this guy or the chief architect for .NET that came from Borland? Of course Java was the model for the VM thing, but that's the what, not the why, the reason they, in the words of the gp, went apesh··· with the bytecode thing. Actually I can neither be in the mind of whoever made the call, just make an educated guess, but at least it has a base on facts that I was paying attention to at that time.