What are the prominent downsides of the D programming language?
mw
mingwu at gmail.com
Tue Sep 29 17:33:47 UTC 2020
On Tuesday, 29 September 2020 at 09:56:47 UTC, Petar Kirov
[ZombineDev] wrote:
> I think one extravagant, but definetely workable solution would
> be create a template DSL (ofc it could also be string
> mixin-based) in D to prototype a multiple
> inheritance system (with e.g. the Eiffel features `rename`,
> `export`, `undefine`, `redefine` / `override`, and `select`).
> Being just a prototype, it should be acceptable to go with
> custom functions like `isSubTypeOf`, `asBaseType`, etc.,
> instead of using the built-in language syntax and semantics.
> (Sort of like https://code.dlang.org/packages/openmethods adds
> multiple dispatch.)
This is an interesting idea, basically implement the Eiffel
compiler (the OO part) as a D library, and perhaps also use
openmethods, then we will have a Lisp's multi-methods + Eiffel OO
inheritance.
I'm not sure how complex this implementation is going to look
like.
Hey, as I mentioned here:
https://forum.dlang.org/post/ufypgxzckjdstifhlrtk@forum.dlang.org
many (if not all) Eiffel compilers actually compile Eiffel
program to C (as target language).
I just uploaded SmartEiffel (open source) 1.1 compiler, and my
previous visitor example to:
https://github.com/mingwugmail/dlang_tour/tree/master/eiffel
e.g. the generated C code of my example is:
https://github.com/mingwugmail/dlang_tour/blob/master/eiffel/visitor/app1.c
We can use D compiler's `-betterC` option to build it, the we are
done :-)
More information about the Digitalmars-d
mailing list