I'd say because JavaScript is insufficiently expressive. No macros, no arrow (pipe) operator, and the premier way of writing it is 4x as verbose than what I'd consider reasonable. D3 is a great library though.
what do you mean by "arrow operator"?
Why is D3 so Verbose?
11–20 of 75 posts
Re: Why is D3 so Verbose?
#12I feel like D3 ought to be the for-computer substrate for libraries that are actually for humans. I suppose it matters less now in the LLM age.
If your LLM is the only one that can reasonably maintain your software, you essentially created a new kind of lock-in, similar to what we already solved with open source a long, long time ago. Once your LLM gets too expensive, goes out of business, and the competitors just don't quite do it the way your favorite LLM does it, you have a problem.
Re: Why is D3 so Verbose?
#13This is why I've always found it weird that people consider D3 to be a charting tool. Yes, people have used it to build a lot of charts, but it's really just a streaming data processing tool. It doesn't provide anything specific to charting[0]. All of that part, you're still left to figure out on your own. [0] At least in the core, I'm not too familiar with the full ecosystem and what is considered official in terms…
Re: Why is D3 so Verbose?
#14This is why I've always found it weird that people consider D3 to be a charting tool. Yes, people have used it to build a lot of charts, but it's really just a streaming data processing tool. It doesn't provide anything specific to charting[0]. All of that part, you're still left to figure out on your own. [0] At least in the core, I'm not too familiar with the full ecosystem and what is considered official in terms…
This is the answer. People need to consider D3 more as a graphics/dom manipulation library than a charting library.
Re: Why is D3 so Verbose?
#15Re: Why is D3 so Verbose?
#16I'd also argue that D3 is no more verbose than vanilla JS (at least for this example). What's the alternative for creating a line in SVG?
const line = document.createElementNS('http://www.w3.org/2000/svg', 'line')
line.setAttribute('x1', ...)
line.setAttribute('y1', ...)
line.setAttribute('x2', ...)
line.setAttribute('y2', ...)
// etc
document.querySelector('svg').appendChild(line)Re: Why is D3 so Verbose?
#17I'd say because JavaScript is insufficiently expressive. No macros, no arrow (pipe) operator, and the premier way of writing it is 4x as verbose than what I'd consider reasonable. D3 is a great library though.
what do you mean by "arrow operator"?
https://blog.frankel.ch/learning-clojure/2/
Something like a(b(c(d(e(7)))))) in Javascript could be written (-> 7 e d c b a) in Clojure?
Re: Why is D3 so Verbose?
#18I feel like D3 ought to be the for-computer substrate for libraries that are actually for humans. I suppose it matters less now in the LLM age.
Re: Why is D3 so Verbose?
#19Mike Bostock is an interesting person, and a case study in why we don't design languages from a single person's genius.