DLang Improves Objective-C Support
Written by Kay Ewbank   
Thursday, 14 January 2021

There's a new release of the D programming language with better Objective-C support, as well as improvements to the compiler, libraries, and tools.

D has been described as a better C and a better C++, as it was implemented after other languages showed how not to do things. In this sense it occupies a position much like Kotlin and its relationship to Java.

dlang

D is binary-compatible with C, is strongly typed with type inferences, single inheritance, interfaces, lambdas, closure and a memory manager. D struggled to achieve mainstream adoption, but then received a boost when GCC announced support for D in 2017, alongside big hitters including C,C++, Objective C, Objective C++, Fortran, Java, Ada and Go.

The announcement from the D programming team includes a new release of the D reference compiler (DMD) and a beta release of the popular LLVM-based D compiler (LDC). The developers say that while:

"C++-compatibility is a bear to get right, it keeps improving with every compiler release. This release continues that trend and also enhances Objective-C support."

DUB, the D build tool and package manager that ships with the compiler has also been improved from what the developers describe as "a good bit of love". The improved Objective-C support includes the ability to declare Objective-C protocols. This is achieved by repurposing interface in an extern(Objective-C) context. Additionally, the attributes @optional and @selector help get the job done.

C++ header generation has also been strengthened. This was already included in an experimental version. You can generate C++ header files from D source code making it possible to call D libraries from C++.

The version of C++ supported as standard has also been updated making C++11 the default standard. Until now extern(C++) code was guaranteed to link with C++98 binaries out of the box. This is no longer true, and you will a switch on the command line to maintain that behavior. The compiler will now also link with C++20 via a command line switch.

dlang

More Information

D Lang Site

Related Articles

D Gets A Boost From GCC  

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.

Banner


Google Updates Responsible AI Toolkit
01/11/2024

Google has announced updates to the Responsible Generative AI Toolkit to enable it to be used with any LLM model. The Responsible GenAI Toolkit provides resources to design, build, and evaluate open A [ ... ]



Looking Forward To NAO 7
03/11/2024

Introduced to the world in 2004 by its creator Bruno Maisonnier the kid-sized, autonomous humanoid robot NAO, turns 20 this year. At less than 2 ft tall, it is small in stature, but plays a big r [ ... ]


More News

espbook

 

Comments




or email your comment to: comments@i-programmer.info