[kwlug-disc] HyperC (was: lc (was: MKS))
Doug Moen
doug at moens.org
Sat Jul 30 19:00:51 EDT 2022
HyperC is a preprocessor for C. It lets you write a single `.hc` file that is preprocessed to generate a `.h` file and a `.c` file. Once modules stabilize in gcc and clang, we'll have an equivalent ability in C++, finally. It lets you define "classes" with single inheritance as struct types that append additional elements to other struct types that are their superclasses, and dynamic method dispatch is supported using a vtable pointer in objects that contains function pointers. There is also a feature for defining enum types with extra metadata (like symbol name strings) associated with each enum value. I haven't used this language in decades, so this is from memory.
Unlike any C++ compiler, it is about 2000 lines of C code. Nobody uses tooling this small and light anymore. The future is programs containing billions of lines of code, generated and maintained using machine learning derived tools, by humans who have no idea what any of the code is actually doing.
I've never used the gnome gtk library or seen any code, but I gather it uses a similar embedding of OOP in C.
On Sat, Jul 30, 2022, at 6:31 PM, Chris Frey wrote:
> On Sat, Jul 30, 2022 at 03:47:33PM -0400, Doug Moen wrote:
>> * It's written in HyperC, which is an object oriented dialect of C that
>> I invented after reading the 1981 Smalltalk issue of Byte magazine. It
>> seemed like a good idea at the time. :-(
>
> Out of morbid curiosity, how does it compare to C++, that "other"
> smalltalk-inspired C-based language? :-)
>
> - Chris
>
>
> _______________________________________________
> kwlug-disc mailing list
> kwlug-disc at kwlug.org
> https://kwlug.org/mailman/listinfo/kwlug-disc_kwlug.org
More information about the kwlug-disc
mailing list