Live data from Hacker News

Internals of a Turbo Pascal Compiler

turbopascal.org

81–90 of 106 posts

Re: Internals of a Turbo Pascal Compiler

#81

Earlier quoted context omitted.

Yes, quite some time back they split the languages and compilers part out and the rump of Borland became an application lifecycle management company, or something like that. The bit you're probably looking for is at http://www.embarcadero.com/ now. Some of the old people like David Intersimone are still there. I worked with Delphi for a long time, through versions 3, 5 and 7 (the odd numbers were always better). When…

I've been working with Delphi for the last 18 months; previously Java and .Net many years before that, but Delphi in the distant, distant past. In my opinion, Delphi needs to just die, and the people/companies that have code bases built on it need to rewrite. There are lots of choices for software development these days, I don't think Delphi stands out for any particular use case in the modern world. But hey, maybe I…

Yeah, Delphi needs to die. I used it for a long time, and it was an excellent product for developing Windows applications when compared to the main alternatives, i.e. Visual C++ with MFC (the horror!) or VB6.

It was fast, efficient, easy to use, with a great community, good tooling and the picky type system tended to find a lot of potential bugs at compile time (once you got used to it).

Now there are a lot of alternatives and to be honest, I can't really think of a reason you'd choose it any more - even if you /did/ want to create Windows native apps.

Re: Internals of a Turbo Pascal Compiler

#82
post #60
post #4

This site doesn't describe the internals of Borland's Turbo Pascal compiler. It describes a compiler written in Turbo Pascal that can compile some subset of Turbo Pascal's language. Borland's Turbo Pascal compiler was written in 16-bit x86 assembly, mostly by Anders Hejlsberg. There is an explanation of this on the front page of the site, but it's not clear from the headline. (I used to work at Borland on the Delphi…

Turbo Pascal was originally written for and targeted the (8-bit) Z80, unless Wikipedia has it backwards. https://en.wikipedia.org/wiki/Turbo_Pascal#CP.2FM_and_DOS_ve... The Turbo Pascal compiler was based on the Blue Label Pascal compiler originally produced for the NasSys cassette-based operating system of the Nascom microcomputer in 1981 by Anders Hejlsberg. Borland licensed Hejlsberg's "PolyPascal" compiler core (…

That's correct. I first used it on a Z-80 CP/M machine.

Re: Internals of a Turbo Pascal Compiler

#83

Earlier quoted context omitted.

I've been working with Delphi for the last 18 months; previously Java and .Net many years before that, but Delphi in the distant, distant past. In my opinion, Delphi needs to just die, and the people/companies that have code bases built on it need to rewrite. There are lots of choices for software development these days, I don't think Delphi stands out for any particular use case in the modern world. But hey, maybe I…

Compared to VC++, it was easier to learn, read, write, make reliable apps, and extend. I could teach anyone a Wirth language. The Go community is learning the benefits of Pascal-style design. People wanting a new Delphi should probably use Go. Just because Delphi stagnated and died off. Anyone wanting Pascal/Delphi today should use Lazaurus IDE w/ Free Pascal Compiler. Compatible with Delphi where it mattered, aiming…

Go might have a few Oberon influences, and it was what made me look at it in first place.

However, even Turbo Pascal was more expressive than Go in terms of language features (not taking the GC into account). Delphi even more so, specially if one takes into consideration the VCL and IDE.

But, it would be nice to see someone come up with a System 3 Gadgets library for Go, or an environment like BlackBox Component Builder.

Re: Internals of a Turbo Pascal Compiler

#84
post #4

This site doesn't describe the internals of Borland's Turbo Pascal compiler. It describes a compiler written in Turbo Pascal that can compile some subset of Turbo Pascal's language. Borland's Turbo Pascal compiler was written in 16-bit x86 assembly, mostly by Anders Hejlsberg. There is an explanation of this on the front page of the site, but it's not clear from the headline. (I used to work at Borland on the Delphi…

Interesting! Any stories you could share from your time at Borland ?

I started programming with Turbo Pascal pretty much (if one doesn't count a small bit of BASIC before). I also have a vivid memory of Delphi, both programming in Delphi (which was a breeze) and reverse engineering programs written in Delphi (which was a nightmare).

Re: Internals of a Turbo Pascal Compiler

#85
post #83

Earlier quoted context omitted.

Compared to VC++, it was easier to learn, read, write, make reliable apps, and extend. I could teach anyone a Wirth language. The Go community is learning the benefits of Pascal-style design. People wanting a new Delphi should probably use Go. Just because Delphi stagnated and died off. Anyone wanting Pascal/Delphi today should use Lazaurus IDE w/ Free Pascal Compiler. Compatible with Delphi where it mattered, aiming…

Go might have a few Oberon influences, and it was what made me look at it in first place. However, even Turbo Pascal was more expressive than Go in terms of language features (not taking the GC into account). Delphi even more so, specially if one takes into consideration the VCL and IDE. But, it would be nice to see someone come up with a System 3 Gadgets library for Go, or an environment like BlackBox Component Buil…

I totally agree. Blackbox is particularly kicking butt in Russia. I recommended Go because it's mainstreamed with all benefits that entails for developers and employers.

Re: Internals of a Turbo Pascal Compiler

#86
post #19

Earlier quoted context omitted.

Pascal and C compilers produced similar code quality back then. Everyone praises C compiler quality nowadays. On those home computers, C, Pascal and Modula-2 were good enough for general purpose applications, if one wanted real speed, Assembly was the only way to go. Turbo Pascal, as well as any other Pascal dialects, had the same capabilities to access hardware as C offered. Also the MS-DOS game development scene an…

Oh right, I remember inline asm in TP now. I smile at how easy this thing was, I didn't even know how many thing happened under the cover, I just typed so glyphs (I didn't know the language) and hit F5 IIRC. Only recently I heard how they designed the compiler to be so fast you didn't see the build step.

Thinking you press F5 for compile/run? That's the kind of shibboleth that outs the QuickBASIC heathen!

Re: Internals of a Turbo Pascal Compiler

#87
post #78

Earlier quoted context omitted.

Compared to VC++, it was easier to learn, read, write, make reliable apps, and extend. I could teach anyone a Wirth language. The Go community is learning the benefits of Pascal-style design. People wanting a new Delphi should probably use Go. Just because Delphi stagnated and died off. Anyone wanting Pascal/Delphi today should use Lazaurus IDE w/ Free Pascal Compiler. Compatible with Delphi where it mattered, aiming…

Most people writing Delphi code in 2015 do it to maintain legacy Windows desktop applications. I don't think you can do that with Go. The most logical replacement would still be C# (or another language running on .net) with WinRT (or more likely WPF: I mean if you are still using Delphi you are probably not using Windows 8/10...).

Funny you say that cuz I picked it for future proofing. I specifically wanted it to be the legacy language instead of C++ in case the talent was short many years down the line. That proved out haha. ;)

Re: Internals of a Turbo Pascal Compiler

#88
post #80

Earlier quoted context omitted.

Compared to VC++, it was easier to learn, read, write, make reliable apps, and extend. I could teach anyone a Wirth language. The Go community is learning the benefits of Pascal-style design. People wanting a new Delphi should probably use Go. Just because Delphi stagnated and died off. Anyone wanting Pascal/Delphi today should use Lazaurus IDE w/ Free Pascal Compiler. Compatible with Delphi where it mattered, aiming…

> People wanting a new Delphi should probably use Go. Just because Delphi stagnated and died off. Or, for that matter, Nim, which also has a huge amount of Pascal heritage. Go is a hybrid of Oberon and C (with semantics leaning more towards Oberon and syntax more towards C, but they're both mixed in), and Nim is Modula-3 semantics married to Python syntax (with the best parts of a bunch of other languages thrown in).…

> which in turn is descended from Python.

I think you meant Pascal?

Re: Internals of a Turbo Pascal Compiler

#89
post #88
post #80

Earlier quoted context omitted.

> People wanting a new Delphi should probably use Go. Just because Delphi stagnated and died off. Or, for that matter, Nim, which also has a huge amount of Pascal heritage. Go is a hybrid of Oberon and C (with semantics leaning more towards Oberon and syntax more towards C, but they're both mixed in), and Nim is Modula-3 semantics married to Python syntax (with the best parts of a bunch of other languages thrown in).…

> which in turn is descended from Python. I think you meant Pascal?

Yes, I did. I'll edit it.

(...and edited)

Re: Internals of a Turbo Pascal Compiler

#90

Earlier quoted context omitted.

I learned programming by digging through TP6 online help. That and Ralf Brown's Interrupt List, so I could do something useful.

Oops! What I meant was, there was no such thing as "online" at all, when TP1 came out. ;-)

Online as in "hlp file that's shown when you press F1". At the time online meant "not printed" :-)
Post reply on HN