Earlier quoted context omitted.
If you were in the authors shoes and you disliked C++ templates would you also have written off Go without trying it, though? No argument on going from D to something else but to not know either and not even try Go is what surprises me.
I was puzzled by strange linguistic ideas of go's designers. The reference to the English language can't justify go's syntax.
Why I Like D
121–130 of 134 posts
Re: Why I Like D
#122Earlier quoted context omitted.
I don't disagree that it can be useful (eg. from one of the other projects mentioned in the thread: https://github.com/Netflix/vectorflow/blob/master/src/vector... ), and I definitely saw plenty of people that liked it. I think it existed in the same realm as a feature like lisp macros which are incredibly useful but when overused can turn the code into an inscrutable mess. The question for me was always how much the…
> b!(c.d)(a) The template parameter after a ! without parentheses is always 1 token, so it's never one of the first two interpretations. Furthermore, the point is that often when writing generic code, you're not supposed to care what the `.d` means specifically. For example, an `InputRange` is defined to have `.front`, `.empty` and `.popFront` properties. Is `.empty` a member variable, function, or constant? Doesn't…
Re: Why I Like D
#123Interesting language // Increment all elements by one (array-wise expression) half[] += 1; Is this really that useful? Seems like a weirdly specific code smell...
I don't know D and just learning this syntax myself, and I'm genuinely interested in where you feel the smell is because I really like this syntax! For example: I know Ruby, so here is what I'm used to: half.map { |i| i + 1 } I also know Elixir: Enum.map(half, fn i -> i + 1 end) ...and JS, I guess because we have to: half.map(i => i + 1) // It looks just like the Ruby one ...vs whatever the Python version is... I don…
Re: Why I Like D
#124Are there linters and other static analysis tools for D?
there's dscanner https://github.com/dlang-community/D-Scanner
Re: Why I Like D
#125Earlier quoted context omitted.
You seem to have some familiarity with the language. Nonetheless, you're understating a bit the degree of integration with C. You can also: create a shared library in D and call it trivially from C or any language with a FFI, call C shared libraries with little effort from D, compile a C file and add the .o file to your D program compilation command directly, use dstep to write C bindings for you, and directly #inclu…
real r/dontyouknowwhoiam moment here
It wouldn't surprise me if he genuinely didn't know about how dstep and dpp are used.
Re: Why I Like D
#126i really want to use D for something , but it's just in that awkward spot where for any given project i can use ocaml instead. ocaml is in roughly the same part of the speed/expressiveness/pleasantness box as D is, plus i already know it. i had two abortive attempts to use the language for specific projects - one was to wrap a C++ library and use it from D, but it turned out the swig bindings didn't work. the second…
Re: Why I Like D
#127Earlier quoted context omitted.
The only way you can be saying this is if you haven't experienced metaprogramming in D. C++ does not compare at all. Generics do not compare at all. You can take D metaprogramming from my cold dead hands.
If you were in the authors shoes and you disliked C++ templates would you also have written off Go without trying it, though? No argument on going from D to something else but to not know either and not even try Go is what surprises me.
D has me fooled and I can't imagine Go choosing to go further in D's direction over C#. I feel sorry for them.
Re: Why I Like D
#128i really want to use D for something , but it's just in that awkward spot where for any given project i can use ocaml instead. ocaml is in roughly the same part of the speed/expressiveness/pleasantness box as D is, plus i already know it. i had two abortive attempts to use the language for specific projects - one was to wrap a C++ library and use it from D, but it turned out the swig bindings didn't work. the second…
Regarding GtkD, you may find this blog interesting: https://gtkdcoding.com/
Re: Why I Like D
#129Earlier quoted context omitted.
If you were in the authors shoes and you disliked C++ templates would you also have written off Go without trying it, though? No argument on going from D to something else but to not know either and not even try Go is what surprises me.
Yeah I do much in C# and almost never use generics. And when I do it is almost always not what I want. D has me fooled and I can't imagine Go choosing to go further in D's direction over C#. I feel sorry for them.
Re: Why I Like D
#130Earlier quoted context omitted.
I don't know D and just learning this syntax myself, and I'm genuinely interested in where you feel the smell is because I really like this syntax! For example: I know Ruby, so here is what I'm used to: half.map { |i| i + 1 } I also know Elixir: Enum.map(half, fn i -> i + 1 end) ...and JS, I guess because we have to: half.map(i => i + 1) // It looks just like the Ruby one ...vs whatever the Python version is... I don…
All of those create a copy of the array and do not modify the original, which may be important on cases like audio manipulation, where there are for instance 44,000 array entries per second. Furthermore, I wonder if D could automatically vectorize this operation when SSE/MMX style instructions are available?