2 ms·
Syntactically, sure. But D is semantically a better combination of Python and Java. With `mixin`, you can `eval` arbitrary strings at compile time. You can cal
by crazypython 6y ago
Syntactically, sure. But D is semantically a better combination of Python and Java. With `mixin`, you can `eval` arbitrary strings at compile time. You can call methods and use variables that are dynamically generated, like Python's `__getitem__` with D's `opDispatch`. You can generate code based on names and member variables using D's traits. You can use Python-like refcounting with `RefCounted!`. You can use Python's generators/iterators using D's lazy ranges, which are just as fast as manual for loops.[0] You can bind to Python with little effort using PyD. Just like Python, D has great C interop.
D compiles quickly and has much nicer syntax than C or C++.
[0]: https://forum.dlang.org/post/xbejngbluilrulstmmhu@forum.dlang.org https://forum.dlang.org/post/xbejngbluilrulstmmhu@forum.dlan...
- pjmlp 6y agoThere a new book about D for Python programmers. "D, the Best Programming Language, for Former Python Developers: (Learn D Programming for Python Developers)" https://www.amazon.com/Programming-Language-Former-Python-Developers-ebook/dp/B08MD7ZB2X https://www.amazon.com/Programming-Language-Former-Python-De...