How do people feel about putting source compiler directives inside rdmd?

bachmeier no at spam.net
Tue Dec 3 18:39:12 UTC 2019


On Tuesday, 3 December 2019 at 17:16:07 UTC, Petar Kirov 
[ZombineDev] wrote:
> On Tuesday, 3 December 2019 at 14:01:07 UTC, bachmeier wrote:
>> On Tuesday, 3 December 2019 at 09:46:59 UTC, Petar Kirov 
>> [ZombineDev] wrote:
>>> On the contrary. Without compiler directives or a tool that 
>>> has them built-in, like dub or rdmd/rund you don't have any 
>>> portability, because you have no idea how run build the 
>>> script. It's ridiculous to expect just the right set 
>>> dependencies to be magically installed on the system where 
>>> the script will run.
>>
>> None of this is relevant if you have a tool that is limited to 
>> running code that doesn't need compiler directives. I'm aware 
>> that some people think you have to add every feature to every 
>> tool. I disagree. Especially in cases where the functionality 
>> is already provided by other tools.
>
> I don't follow, are you arguing that worse is better?

I'm saying we have different definitions of "worse". In your 
opinion, the only thing that matters is the number of features, 
and that's fine. In my opinion, we need to account for the ease 
of use of a tool, particularly for beginners, the difficulty of 
maitenance of the tool, the possibility of clashing with current 
and future features, and the number of bugs users encounter. rdmd 
works, so let's not break it without a really good reason, and I 
haven't seen a really good reason.

> Why would one use an inferior tool, if there's another one 
> providing a strict superset of features (or at least a superset 
> of the ones that one needs) at the same level or better 
> performance?

Nobody would use an inferior tool (that's an interesting choice 
of language) but I don't agree fewer features implies it's 
inferior.

> Unless one is in the unlikely position of writing a single 
> source file (with no imports/includes) bare-metal application I 
> don't see a situation where one doesn't have any dependencies. 
> Even shell scripts have implicit dependencies on things like 
> the shell interpreter (dash vs bash vs zsh vs fish vs ...), its 
> version, the available executable files in $PATH, other 
> environment variables, and other things.

rdmd has worked well for many years without the proposed 
duplication of features.


More information about the Digitalmars-d mailing list