Hypocrisy: FPC/Delphi is Duplicative Too
Not just Ruby.. Is-Ruby-457-Ways-To-Do-The-Same-Thing
All above being said about Ruby, there are some things I don't really like about delphi and fpc languages too. The fact that Freepascal has several different compiler "modes" bothers me, especially since it introduces way more complexity into the compiler.. but at the same time it is a cool feature. I know, can't have cake and eat it too.
Records, Records, or Records?
I also don't like the fact that there are "Classes", "Objects", "Records", and gosh knows what else in Delphi/Freepascal. "Advanced records" too. Why not just records and nothing more? A record that can be extended.. The object system is becoming needlessly complex with "too many options". In ComponentPascal for example there is no "object, class, record". Rather there is just a "record", which can be extended to OOP if you want, but you don't have to. i.e. the "record" in ComponentPascal is your structure. Extend records to OOP when you need to, since ComponentPascal treats records as your objects when you extend them! Simple.. one choice, with extendibility. This is simpler syntax.
But then again freepascal's ability to choose between old stack objects vs heap classes is interesting too. And I can't have my cake and eat it too, always (sometimes I can). I'm not so sure if the added complexity is worth it. The more features you have in a compiler or language, the more funny bugs exist.
C++ Features in FPC
FreePascal's ability to turn on C/C++ features is interesting, but I can't say it is worthwhile since any "cool feature" introduces more bugs into a compiler, or more maintenance tasks. By C/C++ features I mean this:
i += 5;
Yeah, interesting.. but useless.
Is Macro preprocessor Needed?
The macro preprocessor in fpc is worth it. But it is only worth it since people do not use it. It is worth it for very special cases, such as the fpc version checks and lineinfo and such things. If it were abused, I'd think differently and vote to have it removed. However it is being used wisely and is (maybe) a good feature. It makes recompiling the FPC compiler easier as the FPC sources rely on some macro features.
The fpc version checks and other useful macro hacks could maybe be implemented some other way without the macro preprocessor, though - but the macro preprocessor avoids the language constantly changing just to support more features that are used very rarely in very special circumstances.
|