3 ms·
Restrictive how? You had full pointer control in pascal and could drop to assembly with the `asm' statement.
by mickeyp 3y ago
Restrictive how? You had full pointer control in pascal and could drop to assembly with the `asm' statement.
- wiz21c 3y agodropping assembly was the killer feature for me. It allowed to migrate gradually from a very easy to understand language to more performance code, without having to understand what a linker does.
- bluetomcat 3y agoPascal pointers are different animals. Since it is a strongly-typed language, juggling between ints and pointers or between pointers of different types is not allowed. Pointer arithmetic on a byte basis is also not straightforward.
- mickeyp 3y agoThat's... not true? You have `Pointer' for generic pointers and you can use `^' to indicate any type should be pointer based. You can then use Inc() or plain addressing plus arithmetic. And you can use `^' again on the right-hand side to dereference it. And you can certainly juggle between different types. You can cast things in Pascal.
- jhbadger 3y agoPascal was a lot like BASIC in that every version added their own (often incompatible) stuff because the official standard language was so limited. Certainly you couldn't drop down to assembly in standard Pascal -- that sounds like something Turbo Pascal added and may be present in modern versions because of the popularity of that.
- hnlmorg 3y agoIt’s less to do with limitations of the language and more to do with variations in compilers (each vendor wanting to add their own flair to sell their compiler) and a lack of standards. You saw the same with C and C++ before they were standardised.
- hnlmorg 3y agoThat’s a good thing. I do like C but there’s no denying that it makes it ridiculously easy to fuck up. Whereas Pascal enforces correctness. Some view that as annoying verbosity but you can’t please all the people all the time.