Contestcen@aol.com wrote:
When I first started using FPC, [...]
Now I see from your email [...]
Never, ever, would I have guessed [...]
But simply because [...]
Sorry, but what does any of this have to do with GPC?
GPC supports schema types where all of this is straightforward, so the discussion of FPC's ways of doing things and whether or not they are intuitive really doesn't belong here.
For one thing, I would like the compiler to generate warning messages if I try to add two matrices of incompatible sizes.
If the sizes are not known at compile-time, of course, no compiler warning is possible.
If they are, then e.g. my suggested template solution does this in C++, so if we add equivalent support in GPC, this would do it.
So, once again, I throw my support towards adding vector operations to the compiler.
Once again, I'd stress one important principle:
Do not built things into the compiler (or ask for them) that can be done outside of it. Building in things is many times as much work. Maybe I haven't stressed this enough so far because it's so obvious to me, but not to those who haven't worked in the compiler.
In fact, I'm looking at features that will allow us to "build out" things that are now built into the compiler (e.g., strings, sets), of course, without sacrificing efficiency (e.g., using inlining). I think one of the strengths of C++ is that it has powerful and generic (but abstract) language features (e.g., templates) that allow many directly useful features (e.g., strings, I/O) to be written as regular C++ code. (For comparison, C tried so as well, but its built-in features were generic, but not very powerful, e.g. simple pointers for string handling, or varargs for text I/O, both dangerous features that contributed most to C's bad reputation. Pascal provided safe, but not generic features with its built-in string and I/O support.)
Compare my reply to Prof. Harley Flanders' long wishlist: http://www.gnu-pascal.de/crystal/gpc/en/mail14823.html Many of the wanted features can already now be written outside of the compiler. The rest can with a few general new compiler features, viz. templates, automatic con-/destructors, global inlining and function overloading.
What this means for this discussion is:
- When discussing wanted features, we should examine what can be implemented outside of the compiler, and which (preferably general) features really need to be added.
- For implementing the library code, who will do it? Since the excuse "the compiler is written in C" doesn't apply here, anyone interested in the features can start implementing them. (Some, as I said, even today with the existing GPC.) And if we agree that writing compilers is the "hard stuff", it follows that those who don't want to get involved with that might look here for opportunities to contribute.
Frank