On 2017-05-12 10:59, rikki cattermole wrote:
Another way:
preBuildCommands: dub run ddmd:idgen - $ddmd_PACKAGE_DIR
With idgen taking in the location to the root.
Most importantly it is not platform specific ;)
Hmm, so idgen should be a subpackage?
--
/Jacob Carlborg
On 2017-05-09 06:35, Ali Çehreli wrote:
Please list what we've achieved during the hackathon, including what is
started but is likely to be finished in the coming days or months.
For me:
- Finished updating "Programming in D" to 2.074.0 (the HTML is now up to
date but I could not get to the
On 2017-05-10 18:17, Stefan Koch wrote:
It looks like this unitest-test block are treated like a function.
unittest blocks are lowered to functions.
--
/Jacob Carlborg
On 2017-05-09 20:08, Igor wrote:
In case you are interested in the reasoning for having platform code
that imports game code Casey explains that in case where you structure
all platform specific code in functions that other code should call you
are making a needlessly big interface polluting
On 2017-05-08 23:16, Igor wrote:
Hi,
I am following Casey Muratori's Handmade Hero and writing it in DLang. I
got to Day 011: The Basics of Platform API Design where Casey explains
the best way to structure platform specific vs non-platform specific
code but his method cannot work in DLang
On 2017-05-07 07:41, Walter Bright wrote:
Dang, I wish I could participate in that!
I guess there could be a separate one for the United States.
--
/Jacob Carlborg
On 2017-05-07 01:53, Ethan Watson wrote:
I was speaking to Atila earlier about the things we like about DConf.
Sitting around talking to a bunch of computer scientists is fantastic,
and not something people generally get to do in their chosen careers as
a programmer.
EU nations are quite close
On 2017-05-07 06:01, Mike B Johnson wrote:
how many elements(virtual functions) are in the __vptr?
I guess you can use __traits(allMembers) and __traits(isVirtualMethod) [1].
[1] http://dlang.org/spec/traits.html
--
/Jacob Carlborg
On 2017-05-03 14:50, Adam D. Ruppe wrote:
No accident there, the spec says any storage class will do:
http://dlang.org/spec/function.html#auto-functions
"An auto function is declared without a return type. If it does not
already have a storage class, use the auto storage class. "
I see.
--
On 2017-05-03 08:54, nkm1 wrote:
Consider:
import std.stdio;
class A
{
final print() { writeln(this); } // no return type
}
class B : A
{
final void print() { writeln(this); }
}
void main()
{
auto b = new B;
b.print();
A a1 = b;
a1.print();
A a2 = new A;
On 2017-05-02 13:01, Russel Winder via Digitalmars-d wrote:
Is D defined by DMD it's reference implementation, or is there a formal
definition somewhere that is met by the reference implementation?
I would say that it's a mix of "The D programming Language", the
specification on dlang.org and
On 2017-05-02 09:48, ANtlord wrote:
Hello! Is it possible to define associative array on top level of module?
I try to compile this code and I get message `Error: non-constant
expression ["s":"q", "ss":"qq"]`
import std.stdio;
auto dict = [
"s": "q",
"ss": "qq"
];
void main()
{
On 2017-05-02 01:27, Faux Amis wrote:
To me, this [2] suggests otherwise ;)
Or am I missing something?
[2] https://dlang.org/spec/expression.html#order-of-evaluation
From that link:
"Note that dmd currently does not comply with left to right evaluation
of function arguments and
On 2017-05-01 16:51, Mike Parker wrote:
I love SDL and much prefer it over JSON for DUB configs. Use it for all
of my D projects. It looks cleaner and supports comments. I really would
hate to see support dropped.
+1
I would be fine with YAML as well.
--
/Jacob Carlborg
On 2017-05-01 17:45, bachmeier wrote:
I'm porting a small piece of Java code into D, but I've run into this:
int y1 = ((x12 & MASK12) << 22) + (x12 >>> 9) + ((x13 & MASK13) << 7) +
(x13 >>> 24);
I have a basic understanding of those operators in both languages, but I
can't find a sufficiently
On 2017-04-30 09:29, ANtlord wrote:
Hello! I see documentation of pre-release version of standard library.
It has section ddmd. Does it mean that we will get std library with
ddmd? Does it mean we will get a powerful tool for making analysis tools
for D?
No, that's just the generated
On 2017-04-29 20:08, سليمان السهمي (Soulaïman Sahmi) wrote:
GCC has this attribute called abi_tag that they put on any function that
returns std::string or std::list, for the rational behind that read
here:https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html .
the special thing
On 2017-04-27 19:06, Andre Pany wrote:
Another big issue for me is using dub in a company. Big companies do not
want to use the official dub repository due to security issues.
That would be nice.
--
/Jacob Carlborg
On 2017-04-28 04:12, Luís Marques wrote:
Backtraces with line information on macOS?
That would be nice. Should be fairly trivial to look at the Linux
implementation and to the same but read the data from different sections.
--
/Jacob Carlborg
On 2017-04-27 04:52, JamesD wrote:
Yes, the dub.sdl in my dwtlib will auto select "linux" or "windows" and
choose the dflags and lflags accordingly.
https://github.com/jasc2v8/dwtlib
The base/java and core/swt modules work well. What other submodules
would you want included?
I mean that Dub
On 2017-04-27 16:29, Jonathan Marler wrote:
Is someone working on this? I had some ideas on how this could be done.
Yes [1] [2]. I think that there are more pull requests by the same
author. The lexer is already available as a Dub package [3], although
it's not regularly updated (or at
On 2017-04-24 17:03, Mike Parker wrote:
DIP 1007 is titled "'future symbol' Compiler Concept".
https://github.com/dlang/DIPs/blob/master/DIPs/DIP1007.md
All review-related feedback on and discussion of the DIP should occur in
this thread. Due to DConf taking place during the review period, the
On 2017-04-25 00:07, JamesD wrote:
I'm pretty new with D, and I'm not a full-time coder.
A learning goal was to see if I could figure out how to create a dub
package for DWT.
I feel I am well on the way to achieve this goal (32-bit works, need to
test 64-bit).
I respect your work, as well as
On 2017-04-23 14:03, Andrei Alexandrescu wrote:
Mostly out of a sense of conformity. We asked Michael to give no special
treatment of DIPs originating from us, and this one was open, so he put
it up for review. It is likely it will end up rejected in favor of
On 2017-04-22 13:35, David Nadlinger wrote:
LDC officially supports shared libraries on macOS. -David
That's great.
--
/Jacob Carlborg
On 2017-04-18 23:08, Dmitry Olshansky wrote:
Risking a flamewar but what's wrong with Java?
I don't like any language that force me to write in a particular style
or paradigm. Because all problems cannot be solved (or not in a good
way) in the same way. That said, my D code is quite heavily
On 2017-04-19 08:51, Ola Fosheim Grøstad wrote:
If you want AST-macros in D you should also argue for redefining the
core language, and turn everything that is unnecessary and that can be
done as lowering into macros (e.g. "for each").
If D had AST macros from the beginning, then yes,
On 2017-04-19 02:30, Walter Bright wrote:
I'm not saying you cannot do cool and useful things with AST macros. My
position is it encourages absolutely awful code as (usually
inexperienced) programmers compete to show how clever their macros are.
The language gets balkanized into a collection
On 2017-04-18 10:50, Walter Bright wrote:
It may not be necessary to have any dependencies on any import.
$"{a} times 3 is {a*3}"
could be rewritten by the parser to:
"%s times 3 is %s", a, a * 3
and that is that. (I.e. just an AST rewrite.) It would be quite a bit
simpler than
On 2017-04-18 08:59, Stefan Koch wrote:
The corresponding ast-macros would be extremely complex
No, it's not that complex.
, slow and worst
of all not checkable.
What do you mean "not checkable"?
--
/Jacob Carlborg
On 2017-04-17 21:28, Jonas Drewsen wrote:
The page could also list pre-approved language
changes such as async functions (which Walter wants afaik).
Another feature that can be implemented with AST macros. This is
starting to get ridicules. So many features have been added and are
talked
On 2017-04-16 18:10, Nick Sabalausky (Abscissa) wrote:
What I think would be ideal is a language enhancement to allow "interp"
to do its job without the extra syntactical noise. That would not only
give us good interpolates strings, but would likely have other
applications as well.
It's
On 2017-04-16 10:20, Russel Winder via Digitalmars-d-learn wrote:
There are points when you need to ask someone for help…
I am trying to get Dub to build integration tests from test-source as a
separate thing from building unit tests from source. The latter is easy
and works, as does building
On 2017-04-16 10:11, Joel wrote:
I've got Xcode, do I enter `xcode-select --install` in the terminal?
Yes. That will get you access to Clang, the linker and other tools on
the command line. It will also create /usr/include needed to build C/C++
code from the command line.
--
/Jacob
On 2017-04-15 22:04, Jonas Drewsen wrote:
Hi all
I've been wanting to have support for interpolated strings in D for
some time now that will allow you to write e.g.:
auto a = 7;
writeln( $"{a} times 3 is {a*3}" );
Code speaks louder that words so I've made a PR that adds this support
to
On 2017-04-16 03:52, Joel wrote:
In getting DSFML (http://dsfml.com/) working. I found gcc takes for ever
to install, is there some thing wrong? (I posted in
https://github.com/Jebbs/DSFML, but no replies). Maybe just install
Xcode CLT (some how), and uninstall gcc. I've had this problem for a
On 2017-04-15 13:10, Stefan Koch wrote:
It would requires an O(n^2) check per declaration.
Even it is never used.
which would make imports that much more expensive.
Does it need to be that bad? Isn't it possible to do some simple checks
with less overhead? Something like first checking the
I'm not sure if I'm missing something obvious here, but the following
code compiles and runs:
void foo() {}
void foo() {}
void main() {}
Although if I do call "foo", the compiler will complain that it matches
both versions of "foo".
Is this expected behavior of how function overloading
On 2017-04-12 21:58, Walter Bright wrote:
https://issues.dlang.org/show_bug.cgi?id=17099
This is a bit embarrassing.
It seems that the samples fail because they use std.stream, which has
been removed. Anyone want to fix them to use stdio instead?
Seems like compiling the samples should be
On 2017-04-11 19:34, Walter Bright wrote:
Looks like it solves it by adding another layer of indirection:
"the performance overhead of the extra ivar offset variable is small."
Yes, there are always tradeoffs. But as you've said, exceptions are
already slow ;)
--
/Jacob Carlborg
On 2017-04-11 14:56, Jonathan M Davis via Digitalmars-d wrote:
That's basically what's required with D. It is not ABI compatible across
releases, and while ABI compatibility might be nice, it really isn't
reasonable with D - especially with how attributes work and how template
heavy D code is.
On 2017-04-11 02:20, Walter Bright wrote:
On 4/10/2017 4:43 PM, David Nadlinger wrote:
[1] In fact, it looks like – for example with DMD moving to
libunwind-based EH
as well – the issue is slowly resolving itself anyway and at some
point we'll
merely have to sit down for a week and iron out the
On 2017-04-11 02:47, Jonathan M Davis via Digitalmars-d wrote:
Honestly, I don't see how it really makes much sense to use shared libraries
with D except in cases where you have no choice. The lack of ABI
compatibility makes them almost useless.
Also, what are we even looking to distribute in
On 2017-04-11 00:07, Walter Bright wrote:
There are many. A random sampling:
Jacob Carlborg - Objective C support
Actually, this one wasn't my idea originally. It was Michel Fortin that
started this work and did most of it. I just did the necessary work to
get it merged (the initial
On 2017-04-11 04:11, Meta wrote:
I don't agree as you have to add `scope` for the class to be allocated
on the stack.
It's enough to add "scope" when declaring the variable:
scope foo = new Object;
--
/Jacob Carlborg
On 2017-04-10 22:10, Jonathan Marler wrote:
The compiler makes it refcounted if and only if you are "throwing" and
"newing" in the same statment, i.e.
throw new E(); // refcounted
Aha, now I understand. I don't think that was very clear from the beginning.
--
/Jacob Carlborg
On 2017-04-11 08:50, FreeSlave wrote:
D can't compete with C++ until it gets proper dynamic library support on
all platforms. As far as I understand there're still problems on Windows.
And no official support on macOS.
--
/Jacob Carlborg
On 2017-04-10 22:41, Atila Neves wrote:
It'll work, but it won't end up reporting it the same way. If you'd like
that to work seamlessly it's a question of having
`version(Have_unit_threaded)` (or however it is it's spelled) that
imports and throws `unit_threaded.should.UnitTestException`. Then
On 2017-04-09 05:26, Walter Bright wrote:
My previous version did not survive implementation. Here's the revised
version. I have submitted it as a DIP, and there's a trial
implementation up:
What exactly does the user have to do to use throw a RC exception
instead of a GC exception?
--
On 2017-04-09 15:30, Szabo Bogdan wrote:
Hi!
I just made an update to my fluent assert library. This is a library
that allows you to write asserts in a BDD style.
Right now, it contains only asserts that I needed in my projects and I
promise that I will add more in the future.
I would really
On 2017-04-07 18:30, deadalnix wrote:
Because it is in a ML, I cannot post a link.
Is it this mailing list: http://forum.dlang.org/group/study ?
--
/Jacob Carlborg
On 2017-04-07 23:05, Ali Çehreli wrote:
Main reason for D not supporting the name-to-pointer mapping? I don't
think so because as far as I know this has been the case since very
early on but UFCS came very much later.
More likely due to properties, i.e. calling functions without
parentheses.
On 2017-04-07 17:14, Walter Bright wrote:
https://github.com/dlang/dmd/pull/6680
Yes, this is for real! Symantec has given their permission to relicense
it. Thank you, Symantec!
This is some amazing news!! :)
--
/Jacob Carlborg
On 2017-04-02 16:20, Johan Engelen wrote:
I've been thinking for some time now about making a good code formatter,
and the removal of the automatic concat (and the necessity of parens)
makes automatic reformatting of code _a lot_ harder.
Assuming you're thinking of splitting up lines that are
On 2017-04-02 13:14, Jonathan M Davis via Digitalmars-d wrote:
And if the problem is the deprecation message, well, you can only put so
much in a deprecation message without making it too long.
It could contain a link to some documentation explaining it in more detail.
--
/Jacob Carlborg
On 2017-04-02 11:22, Johan Engelen wrote:
Since 2.072, implicit string concatenation is deprecated [1].
Can someone give me a link to the discussion about this?
I am wondering about the language spec changes involved.
```
"abc"
"def"
```
means something different than
```
"abc"
~ "def"
On 2017-04-01 15:34, Andrei Alexandrescu wrote:
Walter and I discussed the following promising setup:
Use "throw new scope Exception" from @nogc code. That will cause the
exception to be allocated in a special stack-like region.
If the catching code uses "catch (scope Exception obj)", then a
On 2017-03-29 13:16, deadalnix wrote:
I was wondering. When uniitests aren't going to run, it may be desirable
to skip parsing altogether, just lexing and counting braces until the
matching closing brace is found.
Obviously, this means that no error will be found in unittests blocks.
That can
On 2017-03-29 08:09, XavierAP wrote:
If this could be found in a very short blog post we could share it on
LinkedIn and stuff.
Everything is closed source so I cannot share the source code.
--
/Jacob Carlborg
On 2017-03-29 03:59, Laeeth Isharc wrote:
I'd be really curious to know what performance of the Ruby
implementation would be like in Crystal (which might mean changing, but
I don't know). They seem to somehow quite often top language
benchmarks, though it's hardly a mature language and
On 2017-03-28 22:59, Atila Neves wrote:
In their defence, that was far more surprising ;)
Yes, for me as well. Unfortunately that took the spotlight away from D :(
--
/Jacob Carlborg
On 2017-03-28 22:10, Jonathan M Davis via Digitalmars-d wrote:
And how would you ever handle a permission error? If you don't have the
permissions for the file, you don't have permissions for the file.
The application can ask for a password, i.e. "sudo". That is what
TextMate is doing.
On 2017-03-28 09:32, Suliman wrote:
Can vibed be competitor (or even better) than Go and Python for
micro-services?
I create a test at work, compared an existing Ruby implementation of an
API end point to a Go implementation and a D implementation. The D
implementation was five times
On 2017-03-28 00:30, kinke wrote:
Yep, so there are no libs my D code can link to, so how am I supposed to
use C++ templates from D (as you're using that as argument for the
`const T *const` mangling)?
As far as I understand, D can link with C++ templates if they're
instantiated on the C++
On 2017-03-28 11:25, Walter Bright wrote:
If you received an IOException instead, you're no better off.
No, I agree. But I have not argued for or against a standardize
exception hierarchy. I've argued that we need more specific error types
(either as a hierarchy or flat structure).
As
On 2017-03-25 09:13, Uranuz wrote:
I just put debug messages on every `assert` and figured out it fails on
lines:
bool implicit0 = (f.next.ty == Tvoid && isMain());
Type tret = implicit0 ? Type.tint32 : f.next;
assert(tret.ty !=
On 2017-03-25 08:25, Uranuz wrote:
../ivy/src/ivy/interpreter.d-mixin-670(670): Error: undefined identifier
'__cmp' in module 'object'
I think this error is due to a mismatch of DMD and druntime. The
compiler lowers some kind of comparison to a call to __cmp which is
implemented in the
On 2017-03-24 20:38, H. S. Teoh via Digitalmars-d wrote:
It's already kind enough on my part to actually
want to use std.format to produce a message that a human reader might
find helpful, like "syntax error on line 36: unexpected character 'x'".
I could have just done a `throw new
On 2017-03-23 21:45, Adam D. Ruppe wrote:
I'm of the firm belief that exceptions should NEVER have a string
message - that's a code smell. If you do it right, all the info can be
determined automatically by the exception type and passed arguments and
*that* is what gets printed to string.
On 2017-03-24 01:25, Walter Bright wrote:
It's a compelling point, and is the reason why there are many different
exception types in Phobos.
But in my experience, if an error happens and it is local enough to be
dealt with specifically, it is checked for directly without needing to
go through
On 2017-03-23 21:48, Jonathan M Davis via Digitalmars-d wrote:
There are plenty of cases where all you care about is that something went
wrong when calling a function and aren't going to do anything special
depending on what went wrong. You just handle it and move on.
If you don't know that
On 2017-03-23 20:47, Walter Bright wrote:
Thanks for expressing this better than I could have. Over time I've
found that standardized Exception types seem to become less and less
useful over just using "Exception" with an appropriate message.
A plain Exception is completely useless, it can
On 2017-03-23 13:26, Nicholas Wilson wrote:
Getting dmd to do the linking should work.
You may wish to see what mir (github.com/libmir) does to build in it's
"Better C" mode, so i'm sure it is possible, I just don't know the
incantations, sorry. Perhaps someone else can help.
As an ugly
On 2017-03-20 21:09, Atila Neves wrote:
http://code.dlang.org/packages/excel-d
This dub package allows D code to be called from Excel. It uses
compile-time reflection to register the user's code in an XLL (a DLL
loaded by Excel) so no boilerplate is necessary. Not even `DllMain`! It
works like
On 2017-03-20 10:07, Russel Winder via Digitalmars-d-learn wrote:
And different behaviour with different build options, at least when
using dmd, but I think the same is true for ldc2:
|> dub test
No source files found in configuration 'library'. Falling back to "dub -b
unittest".
Performing
On 2017-03-20 00:49, Ervin Bosenbacher wrote:
On Sunday, 19 March 2017 at 23:23:48 UTC, Adam D. Ruppe wrote:
On Sunday, 19 March 2017 at 22:33:26 UTC, Ervin Bosenbacher wrote:
Is it normal to see the long trace output instead of just a failed
unit test message?
Yeah, it is normal, though IMO
On 2017-03-19 22:32, Nordlöw wrote:
Is there an in-place version of std.uni.toLower()
If not, how do I most elegantly construct one?
I would recommend against toLower and toUpper as in-place versions. Not
all letters can be converted in-place, i.e. they might require more storage.
--
On 2017-03-15 15:08, Suliman wrote:
Could you give an example when it's better to use DBRow and where to get
data in structure?
Use PGCommand and call "executeQuery" to get back a result set that is
iteratable:
auto query = "SELECT * FROM foos"
auto cmd = new PGCommand(connection, query);
On 2017-03-14 14:32, Suliman wrote:
Does it work fine on Linux with x64 Postgres?
I've tested it on macOS and Linux 64bit. Works great.
--
/Jacob Carlborg
On 2017-03-08 12:59, Guillaume Piolat wrote:
Is it possible to use std.experimental.allocator without the runtime or
with the runtime disabled?
I had a quick look through the imports, I could not find anything that I
know uses the runtime. Although it does use exceptions and asserts in
some
On 2017-03-07 21:15, Nick Sabalausky (Abscissa) wrote:
And anyone know about OSX? Would OSX use the getentropy the article you
linked to mentions for OpenBSD?
As far as I can see, there's no "getentropy" on macOS. I see references
to it online, but I cannot find it in any header files.
Or
On 2017-03-07 04:44, Nick Sabalausky (Abscissa) wrote:
This one is very surprising. How is that so, if both structs being
compared are of the same endian-ness?
The structs for a given run will be of the same endian-ness. But if you
run the same code on two different systems, one with little
On 2017-03-06 17:27, Deech wrote:
I was thinking something on the order of Scala's pattern matching using
apply/unapply methods. http://www.artima.com/pins1ed/extractors.html.
That should be possible. Although not as a macro and not with the same
nice syntax. Something like this should be
On 2017-03-03 16:23, Moritz Maxeiner wrote:
That would be a good next step from an engineering standpoint, I agree,
to proceed to minimize the amount of trust in people you need to have vs
verifiable safety.
I have considered porting something like seL4[1] to Rust, but ultimately
this would
On 2017-03-03 16:16, Kagamin wrote:
Nitpick: object.d is for symbols visible to user code, but it's not
necessary to provide these helper functions to used code, so they should
be in a different module known to the compiler.
Exactly
On 2017-03-03 03:11, Moritz Maxeiner wrote:
For what it's worth: I do hope memory safety becomes a common feature
and what languages like D and Rust do on that front is great (even
though both D's still heavily integrated GC as well as Rust's static
analysis have their downsides).
My major
On 2017-02-28 17:37, Nick Sabalausky (Abscissa) wrote:
Maybe they should be, but with the basic git interface, or any front-end
I've seen, they're terribly convoluted. Particularly squashing. Well,
either that, or the docs are just really, REALLY bad.
There's no reason either one of those
On 2017-02-28 15:58, Andrei Alexandrescu wrote:
It has been fixed on 2/25. Apologies for the annoyance. -- Andrei
I can see that it works now, thanks.
--
/Jacob Carlborg
On 2017-02-28 00:42, Nick Sabalausky (Abscissa) wrote:
Contributors shouldn't have to know as much about git as a project's
maintainers. So these features, if used, are AWESOME.
Squashing and rebasing is part of the basic git, in my opinion.
--
/Jacob Carlborg
On 2017-02-28 07:08, Walter Bright wrote:
I had sent a confirmation email. Unfortunately, there are often problems
with this, as the emails get put in the recipient's spam folder.
Could we please just fix the problem. This is quite embarrassing. I
reported the problem the day the
On 2017-02-26 06:50, Andrei Alexandrescu wrote:
On 2/25/17 2:55 PM, Timothee Cour via Digitalmars-d wrote:
Try dscanner --sloc although IMO --tokenCount should be the most
relevant metric (only caveat is mixin strings with which one could cheat
to make token count smaller).
Thanks, got that
On 2017-02-24 23:44, XavierAP wrote:
And second question, is DWT the de facto standard for creating GUIs? Or
are there good competitors.
There's no de factor library for creating GUIs in D. If you want a
native look and feel, DWT is a good option. If you want the application
to look the
On 2017-02-24 19:10, houdoux09 wrote:
The problem is that I can not retrieve the variables from the parent class.
Cast the value to the type of the base class and run it through the same
function. You can have a look at the Orange serialization library [1].
[1]
On 2017-02-22 20:13, thedeemon wrote:
On Wednesday, 22 February 2017 at 18:34:26 UTC, houdoux09 wrote:
void Read(T)(T value)
{
foreach(i, mm; value.tupleof)
{
writeln(__traits(identifier, value.tupleof[i]), " = ", mm);
if(isArray!(typeof(mm)))
{
Read(mm[0]);
On 2017-02-20 14:47, Jolly James wrote:
How to sort the members of a class?
like:
1. properties
then
2. private 3. methods
4. ctors
... and so on. are there any recommendations?
In my opinion:
1. Manifest constants (enum)
2. Static variables
3. Instance variables
4. Constructors
5.
On 2017-02-22 14:08, Mike Parker wrote:
Walter shares a little bit of compiler knowledge, explaining how DMD
stuffs string literals into object files.
Blog post:
http://dlang.org/blog/2017/02/22/snowflake-strings/
Reddit:
On 2017-02-22 12:18, Martin Tschierschke wrote:
Exactly what I was looking for, **thank you!**
Both ways of accessing the struct elements are very interesting,
giving an impression what is possible with D.
Is it possible to overwrite "toString" for all structs in one step?
It depends. You
On 2017-02-21 03:53, Timothee Cour via Digitalmars-d wrote:
relying on the shell (especially involving arrays) seems like a bad
idea: not portable, easy to mess up:
`dmd -L{-lbar,-Ldir,--export-dynamic}` works but what if it's stored in $lflags:
lflags="-lbar,-Ldir,--export-dynamic"
the
On 2017-02-21 23:49, H. S. Teoh via Digitalmars-d-learn wrote:
That may appear to work, but I would *strongly* recommend against it,
because what happens when you use enum with an AA, is that the AA will
be created *at runtime*, *every single time* it is referenced. (It is
as if you
On 2017-02-20 17:04, Martin Tschierschke wrote:
Hello,
I have a little program where I am filling a struct with values from an
regex match.
Now I want to display the content of the struct for debugging purpose.
If struct is named MyStruct
I can print a list of the field names with:
901 - 1000 of 3698 matches
Mail list logo