News for hackers. Stuff that matters.

Neku42

Re:I spent a year of my life making an ASN.1 compiler in D on Sunday October 26, 2025 @03:47PM (#45714674)
If you introduce coroutines, please consider unifying them conceptually w/ generators (or better yet - ranges)
Re:I spent a year of my life making an ASN.1 compiler in D on Sunday October 26, 2025 @03:45PM (#45714657)
>Heavy reliance on the range interface, without automatic support for common range-like types like arrays, so calling code must be cluttered with wrappers.

But D arrays/slices are already ranges. Is this referring to string autodecoding or something else completely? I fail to recall any situations where builtin types required wrappers often.

>Insistence on returning things exclusively as ranges, even when a single item is wanted, so calling code must be cluttered with dereferencing. (e.g. std.algorithm.searching.find)

This is mirroring C++ iterator design and IMO the right move though I agree that specifically for ranges it is rather awkward to use in practice.

What would you return instead? A pointer? What if one wants to find the position of the element and do something after that with that position/subrange.

Nous Research is NOT equivalent of Mistral. They are not even in the same league. Nous Research is basically LARPing an AI lab compared to Mistral
Re:(On | No) Syntactic Support for Error Handling on Tuesday June 03, 2025 @05:41PM (#44175046)
Even if the decision to close the door on this sucks I think they are correct - this is not a syntax problem. Adding sugar will not fix fundamental issues w/ Go's error handling.

They need to add/fix like 5-6 different parts of the language to even begin addressing this in a meaningful way.

Re:Programming in D: Tutorial and Reference on Saturday April 26, 2025 @07:33AM (#43802693)
Programming in D after C++ is like the opposite of death by 1000 cuts - its just a constant stream of finding nice little things that simplify your life or avoid footguns. You become accustomed to all the niceties very fast and its hard to justify going back haha.

D is by no means perfect (and over the years it has accumulated lots of warts) but if you know what you are doing it enables amazing productivity and almost never gets in your way. If you have an idea about solving a problem in a particular way there's almost always a path available to do just that without running into "computer says no" situations (stares at Go).

Re:Specification for the D Programming Language on Wednesday January 08, 2020 @03:24PM (#21995390)
I found D 10 years before and it had the same stale feeling it seems to irradiating today and this is turning people away

The truth is it was good enough for most uses already but people waited out for someone to step up and make things better before they felt it would be worth trying D

D really shines if you do greenfield projects where you have the luxury to reinvent some wheels. Its surprisingly pleasant to see a lot of boilerplate one might expect to accumulate to just not be there because it’s either generated or is just not necessary because the language is flexible enough

Re:Specification for the D Programming Language on Wednesday January 08, 2020 @02:59PM (#21995129)
This seems to be an increasingly growing niche where D is gaining popularity. I see more and more people turning to D where they would normally use python or R for adhoc data crunching
Re:Specification for the D Programming Language on Wednesday January 08, 2020 @02:55PM (#21995093)
Standard library doesn’t provide similar functionality but it’s trivial to implement a mixin template that would implement print or hash function for any type

That being said standard formatting function can automatically print most types including user types. This eliminates necessity for automatic formatting implementation in majority of situations

Re:My Vision of D’s Future on Tuesday October 15, 2019 @03:44PM (#21262835)
You totally could create static libraries or compile stuff statically inside binaries to create a go style standalone executable but you need to recompile Phobos as a static lib for that
Re:Ask HN: Why is there not a memory-safe C? on Thursday May 24, 2018 @07:45AM (#17143032)
D programming language has a memory safe subset called safe-d (https://dlang.org/articles/safed.html) and a subset called better c (https://dlang.org/spec/betterc.html) so you can probably use a combination of two subsets
Belarusian here. I would describe Donald Trump as american Yeltsin, but whatever.