Hacker News new | ask | show | jobs
by wk_end 1838 days ago
I think you're conflating two different things, and although you've identified a real problem, that conflation is causing you to blame the wrong thing for it.

Verilog has a vaguely C-ish syntax, and VHDL has a vaguely Ada-ish syntax, but in my experience neither of them feel "imperative" in any real way once you get a handle on them. The issue with the syntax appearing imperative is superficial: imagine adding a C-like syntax to Haskell, perhaps to spur adoption the way Reason did for Ocaml - it wouldn't make it any less functional.

The real issue isn't functional vs. imperative - it's just that VHDL and Verilog are still painfully primitive in terms of their capacity for abstraction.

1 comments

How do you add C syntax to Haskell without resorting to monadic syntax? (But then your expression is, well, in a Monad, and does not have the same type anymore.) There isn't even any inherent sequencing (much unlike ocaml), so would a function just be some long C statement?

No, I stand by what I said, the syntax itself is essentially imperative, and it is a bad fit. A purely functional language (like Haskell, not like ocaml) with a C-like, so imperative, syntax would be a bad fit as well. And FPGA designs are naturally pure functions within an applicative functor, which languages like Clash demonstrate well.