4 ms·
Pascal is the ideal language to learn compilers, because the language is so easy to parse. Nonetheless, it is still a real language, much closer to C than, let'
by coliveira 7y ago
Pascal is the ideal language to learn compilers, because the language is so easy to parse. Nonetheless, it is still a real language, much closer to C than, let's say, Lisp.
- brudgers 7y agoI wasn’t trying to say Pascal is problematic beyond toolchain logistics. Pascal is no longer mainstream and using it probably means using a text editor or an unfamiliar IDE. Compared to more familiar languages, you’re pretty much on your own to figure out tools unless you already use Vim or Emacs. Which why people use Vim and Emacs. Now you have three problems...without regular expressions.
- pjmlp 7y agoFreePascal, Delphi and Oxygen, already three possibilities. And there are a couple of other variants still around. Lazarus, Visual Studio Code, Delphi IDE, Oxygen IDE, Emacs, Vim, Eclipse as IDEs.
- brudgers 7y agoExactly. 3 x 8 logical combinations. And 3x operating systems. Without Notepad, Sublime, and gedit. It’s not insurmountable but it ain’t nothing. And it isn’t writing a compiler either. Everyone doesn’t walk in my shoes.
- pjmlp 7y agoSo how that is any different of multiple combinations of C compilers and respective IDEs/Editors?
- brudgers 7y agoLet's Build a Compiler doesn't use C?
- pjmlp 7y agoSure, and I still fail to see why going through it and using Pascal is supposed to be a problem.
- brudgers 7y agoThe toolchain probably isn't on your computer. And the internet provides 72 options (or 99 if you consider Notepad, Subline Text, and gedit).
- coliveira 7y agoWhy is the text editor even an issue? Anyone able to learn how to write a compiler is fully capable of deciding which editor or IDE to use.
- brudgers 7y agoThe book isn't for people who are able to write compilers. When I discovered Hacker News, I'd never heard of Python. When I joined, I used Visual Studio Express, or rather Expresses because each was language locked. Obviously, I ran Windows. It was still four years until I bit the Emacs bullet. Yeah, installing and running Pascal wouldn't be a problem for me now. But I remember a time when it would have been. I remember what that was like. Half of all programmers are below average. I'm certainly one of them.
- pjmlp 7y agoSo they are in for a surprise, because even on FOSS friendly OSes programming languages aren't installed by default unless one choses either full installation or a development profile.
- brudgers 7y agoPythons, Perl, and gcc are commonly part of Linux distros. C compilers have been part of Unix since K&R. They are necessary to install the system. Hell, noobs rPi’s come with the Wolfram language too.
- coliveira 7y agoI don't understand why you're comparing Pascal to vim and Emacs. You don't even need to use Pascal to create a compiler in Pascal, do you understand that? I once created a simple Pascal compiler using C, and it was a simple project, much easier than parsing any other language. You can use any language you want, even Python would work.