Earlier quoted context omitted.
The Low and High compiler intrinsics make array indexes easy to deal with. You don't need to care about the indexing to iterate over the array. You just go from Low(array) to High(array): http://docwiki.embarcadero.com/Libraries/Berlin/en/System.Lo...
I don't remember if Apple Pascal had those intrinsics or not. But I never saw any code that used them, and I read most of the Pascal code base for MPW and a bunch for the OS.
Pascal at Apple
81–90 of 145 posts
Re: Pascal at Apple
#82Earlier quoted context omitted.
Speaking of few differences from C and busted string semantics: my least favorite thing about Pascal is that strings and some types are 1-indexed, but dynamic arrays are 0-indexed. https://stackoverflow.com/questions/4083356/array-begin-from...
And the string length is in the 0 byte, meaning no strings longer than 255 bytes. At least in old Turbo Pascal anyway!
Besides, there were arrays as well, and TPW had safer strings without that limitation PCharStr.
Re: Pascal at Apple
#83Earlier quoted context omitted.
I don't know anything like Lazarus, but I do know a language that shares many of the characteristics of Pascal (small, fast, native binaries). That language is Nim and I think there is a good chance we could get something like Lazarus out of it.
If you can do Visual Basic-like forms with it... that's the main appeal of Lazarus for me right now - instant native GUI development.
So we had to wait 20 years, failure of Moore's law, cache optimization issues, competition from new languages, for them to come up with .NET Native, CoreRT and the initial AOT on Java 9
Re: Pascal at Apple
#84I'm reminded of a really great interview with Bill Atkinson where he describes (among many other things) how he initially brought Pascal to Apple and the Apple II. https://youtu.be/6tUWoy1tJkE?t=45m The Pascal bits are from 45:00 to about 50:00. ... My manager at the time said, no, we don't want to do this [Pascal], people are happy with what they got. I overrode him and went to Jobs, and Jobs said "Well, I'm not con…
Re: Pascal at Apple
#85I really miss Pascal; it was a great and safe language for beginners. As it was extended with Objects and Modules, it was great for development. But there are good reasons it was surpassed by C. In early Pascal, you got a pointer by allocating memory; you could not get a pointer to an existing variable. You'd be surprised how often that gets in the way when implementing a data structure. Just try to implement the fol…
How does Pascal compare to python for absolute begginers?
Start with Python and you're most likely to be stuck with dynamic typing/runtime mindset and it'll distance you too far away from OS level native land.
OTOH starting with Pascal, you'll learn a great deal of low level (well, relatively) stuff and that will make you appreciate the higher level languages when the time comes and will let you leverage them more efficiently. Also as a bonus, a big bonus I think, Pascal will let you feel at home if you ever need C/C++/D in your career.
Re: Pascal at Apple
#86Earlier quoted context omitted.
When I drive my car without an engine, it only goes downhill. I almost stopped using cars because I thought there was nothing interesting there. It's 2017. Turn on your JavaScript.
It doesn't matter what year it is, JavaScript provides zero utility on a blog except to give the author analytics. Why do people hate the idea of documents so much? Imagine if you had to suffer through a different app for every single book you read; that is what a js-mandatory page is.
Re: Pascal at Apple
#87Earlier quoted context omitted.
When I drive my car without an engine, it only goes downhill. I almost stopped using cars because I thought there was nothing interesting there. It's 2017. Turn on your JavaScript.
It doesn't matter what year it is, JavaScript provides zero utility on a blog except to give the author analytics. Why do people hate the idea of documents so much? Imagine if you had to suffer through a different app for every single book you read; that is what a js-mandatory page is.
Re: Pascal at Apple
#88Earlier quoted context omitted.
Off-topic, but nested functions are one of my favorite gcc extensions.
I discovered with C and C++ compilers, if an extension was added that was not in the Standard, nobody would use it - not even the people who requested the extension. It wasn't like the Pascal community, where nobody would use the compiler unless it had a boatload of extensions :-)
Re: Pascal at Apple
#89I'm reminded of a really great interview with Bill Atkinson where he describes (among many other things) how he initially brought Pascal to Apple and the Apple II. https://youtu.be/6tUWoy1tJkE?t=45m The Pascal bits are from 45:00 to about 50:00. ... My manager at the time said, no, we don't want to do this [Pascal], people are happy with what they got. I overrode him and went to Jobs, and Jobs said "Well, I'm not con…
Re: Pascal at Apple
#90Earlier quoted context omitted.
Oh, I remember, although in my mind's eye, the 16K expansion card was bigger, about as big as a graphics card of today.
I was lucky enough to have a second hand Apple ][ from a "hacker", it had a ][+ rom and was pretty much loaded to the gills with a "z80 softcard" and etc. The slot 3 80-column card also had 16K RAM and was the only full-sized card in the machine. (It also came with full documentation if you wanted to burn a different font into a ROM.) So I had a 64K machine, but slot 0 was empty. Unfortunately I never had docs for Pa…