On Tuesday, 30 July 2013 at 14:49:44 UTC, Dicebot wrote:
On Tuesday, 30 July 2013 at 14:39:31 UTC, JS wrote:
I seriously don't see the issue ;/ By having some special
convention for declaring the template then any user of it
should have some inclination. Progress isn't made by dumbing
down to the lowest common denominator or removing all chances
for failure.
How bout a simple command line switch to enable the feature?
It is major issue for code readability and clearly separating
generated code from manually written one. Reading is always
more important than writing when it comes to code.
I don't think so. If you write nice code but it is useless then
there is no point in anyone reading it.
If one allows proper mixin behavior and D ever gets a good ide,
then it will be possible to have an intellisense like feature
where string mixins are compiled and shown to the user so they
can be read properly.
If you block every aspect to make using such features easier then
few will use them and there usage won't get easier.
I think your problem is that you believe if it is not useful to
you then it is not useful to anyone else.... or if it confuses
you then it will confuse everyone else. It's a very arrogant
attitude because everything centers around what you think.
You can't expect things to be perfect right from the start... and
all of programming is about making life easier for the
programmer, not harder. Just because you believe such a feature
will make your life more difficult doesn't make it so.
The fact is, that string mixins are already hard to read... so
just by removing the mixin statement won't change that. The point
you are trying to make is flawed.
If you are using some library and you call some template and your
code blows up and you don't know why... then go read up on that
function... there you'll see it is a string mixin. Then, if you
get tired of all error obfuscation, go write an ide to make life
easier. At some point it will be....
After all, if it were such a big deal then the feature could be
removed, and it would not be hard to fix code that used it(just a
simple mass search and replace). (this is only true if a special
syntax was used to declare such mixins, like "string mixin
template_name()".
Anyways, it would be nice to actually debate the real merits of
such a feature rather than feelings about it.