From mboxrd@z Thu Jan 1 00:00:00 1970 From: imp@bsdimp.com (Warner Losh) Date: Thu, 31 Aug 2017 10:12:43 -0600 Subject: [TUHS] Why Pascal is Not My Favorite Programming Language - Unearthed! In-Reply-To: References: <201708301234.v7UCYsPQ002608@freefriends.org> <20170831011339.9465B124AEA5@mail.bitblocks.com> <20170831144852.GK11202@mcvoy.com> Message-ID: I did a lot of Pascal programming back in the day on my DEC Rainbow with Turbo Pascal. Also wrote a compiler for an 'extended subset' of the language in my CS compiler's class, which was fun. But by then I'd transitioned to C (once Turbo C was available for the IBM-PC, I hacked together a TSR so I could run it on the not-too-compatible Rainbow). I liked the low level access, but honestly, when I was a kid programming, I liked that { was 4 characters shorter than BEGIN and } was 2 shorter than END more than anything else... Also, the generally mono-case of C (at the time, this was before I discovered X11's bletcherous CamelCaseStyle) was easier on the eyes.... But these days I'm more mellow about this stuff since I know that the time to type in the code is tiny compared to the time spent chasing down a bug because ++*++foo--; didn't work like you'd expected making all the cleverness that went into it wasted... Warner On Thu, Aug 31, 2017 at 9:26 AM, Eric Wayte wrote: > In the mid 80's when I took Programming II as part of my CS degree, I used > every Pascal compiler I could get my hands on: Waterloo Pascal on VM/CMS > (mainframe), Turbo Pascal, UCSC p-System on an Apple II, and Kyan Pascal on > my Atari 800XL. > > Fun times! > > On Thu, Aug 31, 2017 at 10:48 AM, Larry McVoy wrote: > >> I did a lot of programming in Turbo Pascal (because it was so fast >> to compile) and I liked the language OK. >> >> I was taught data structures in Pascal and later taught using Pascal >> and it was a fine teaching language. I agree with the comment that >> it is easier to use right, more guard rails. >> >> But as you grow up, you want to take off the guard rails once in a >> while and Pascal didn't let you do that. C does that routinely, >> which one could argue isn't that great, but it sure is handy. >> >> On Wed, Aug 30, 2017 at 06:13:39PM -0700, Bakul Shah wrote: >> > On Wed, 30 Aug 2017 06:34:54 MDT arnold at skeeve.com wrote: >> > > Brian Kernighan was kind enough to find for me everyone's favorite >> > > Computing Sceince Technical Report, CSTR 100, "Why Pascal is Not >> > > My Favorite Programming Language". >> > >> > If I may comment on the paper itself.... >> > >> > I used Pascal heavily for about 5-6 years and was also >> > involved in implementing a variant of Pascal for a couple of >> > years. And I have used C since 1981. I have to say I was >> > quite happy using Pascal. Some of bwk's criticism (e.g. re: >> > sets) applies to pascal compilers, not the language. There is >> > also some misunderstanding (e.g. >> > type apple = integer; orange = integer; >> > This is renaming, not a new type). The array problem got >> > fixed somewhat in the 1985 standard, while arrays are not >> > even first class objects in C. Most implementations added >> > separate compilation as well (1985 standard considers this an >> > implementation issue but does allow you to declare external >> > references). >> > >> > Things I missed in C that were in Pascal: >> > - enumerated types (type color = (red, blue, green)) >> > - subranges >> > - nested functions (even if limited) >> > - first class arrays (even if limited) >> > - sets >> > - lexical non-local goto >> > - bounds checking >> > - arrays that didn't start at 0. >> > - function argument checking (K&R C) >> > - tagged variant records >> > >> > All in all, both languages are quite comparable. Each >> > language had their strong points and weak ones. Basically Pascal >> > was easier to use /right/ and C more flexible. Pascal code is >> > easier to read than C code (even today). It was harder to >> > "cheat" in Pascal but the same is a useful feature of C for >> > low level work. To be frank the *main* thing that attracted >> > me to C was its conciseness :-) If Unix was written in Pascal >> > I would've happily continued using Pascal! >> > >> > --bakul >> >> -- >> --- >> Larry McVoy lm at mcvoy.com >> http://www.mcvoy.com/lm >> > > > > -- > Eric Wayte > -------------- next part -------------- An HTML attachment was scrubbed... URL: