On Sun, 2012-09-09 at 08:05 -0700, Ali Çehreli wrote:
[…]
> Similar to pragmas in C and C++, D pragmas allow language extensions: 
> "Pragmas are a way to pass special information to the compiler and to 
> add vendor specific extensions to D."
> 
>    http://dlang.org/pragma.html

This states that:

        pragma(lib, "blah.lib")

is a part of the D language and not just a DMD extension.  This means
that the code is platform specific (due to extensions embedded in code)
as well as predicating that the toolchain will deal with explicit
toolchain information in the source code.

Personally I would say that putting dependencies such as this in the
source code is anathema, it is the role of the build framework to deal
with this. That way you can deal with the platform specific extensions
and naming as well as toolchain issues. These dependencies are link time
not source time ones.

So I am with Johannes, pragma(lib,…) is "evil" and should be removed.

-- 
Russel.
=============================================================================
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.win...@ekiga.net
41 Buckmaster Road    m: +44 7770 465 077   xmpp: rus...@winder.org.uk
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to