[HN Gopher] I Wrote a High-Frequency Trading Platform in D
___________________________________________________________________
I Wrote a High-Frequency Trading Platform in D
Author : christophilus
Score : 22 points
Date : 2021-12-11 14:49 UTC (8 hours ago)
(HTM) web link (dlang.org)
(TXT) w3m dump (dlang.org)
| justsaying9 wrote:
| D is an interesting language, but I don't really know much about
| it. Seems like the first time I ever heard of D was in a BBS
| files listing back in the 90s. That must have been right around
| when it first came out. Since then I hear about it from time to
| time, but never checked it out, until yesterday, when I happen to
| have finally downloaded the compiler. I'm now looking for code
| samples, tutorials and such to get started. Would love to see how
| this trading platform is implemented, but I doubt source is
| available. I've seen Walter Bright posting on here from time to
| time, and get a good impression of him from his comments. Anyone
| else have experience with D they'd like to share?
| petre wrote:
| It's basically C++ done right. Much more easy to learn than C
| or C++ and be productive in it from day one. It won't become
| boring or annoying like Go, because the language is loaded with
| features and there's always something new to learn. It's
| garbage collected, so you don't need to worry too much abot
| allocating and freeing memory, but it's helpful to have an
| insight and understand how it works (there are articles about
| it on dlang.org). Of course, one could also disable it. Of
| course Go has many more good quality libraries for just about
| anything you could dream of, but D interfaces very well with
| existing C and C++ libraries.
| justsaying9 wrote:
| I'm a C guy and have played around with C++ back in the day,
| but have come to despise the language, with all of its
| increasing complexity, warts, design flaws, and footguns. I'm
| highly suspicious of Rust and Go as well. I prefer the C way
| of doing things, with no garbage collector, though I do tire
| sometimes of all the extra grunt work that goes into
| implementing anything in C. Looks like D has a lot of
| features geared toward making development faster, without
| loading up with too much complexity like C++. Just read about
| the 'better C' mode which sounds interesting. I like that
| it's made to integrate seamlessly with C libraries. Are there
| any good examples of larger programs or libs written in D you
| could point me towards, so I can learn by example the 'D way'
| of doing things?
| arch-ninja wrote:
| D is an excellent mix of good design decisions, metaprogramming
| (your macros can run arbitrary code at compile time, a la zig),
| and a nice standard library. They also have some of the best
| API-building libraries available, and the compiler has the
| ability to run source code almost as if it were interpreted and
| it caches binaries under /tmp/ to avoid work if the source is
| unchanged.
| justsaying9 wrote:
| Yeah, I was poking around in the compiler source and noticed
| a D file with the #! prefix so it could be executed in
| interpreted mode. Just like tcc does, except I guess it would
| work for any valid D program, unlike tcc which won't compile
| all C code. That's a great feature to have. I do get the
| impression from looking at it at a distance that it's well
| designed.
___________________________________________________________________
(page generated 2021-12-11 23:01 UTC)