3 ms·
They are not all that well typed. You can't have constrained types, for example (available with type classes in Haskell). I spent long time with VHDL, which is
by thesz 9y ago
They are not all that well typed. You can't have constrained types, for example (available with type classes in Haskell).
I spent long time with VHDL, which is Ada with third leg. It is not nice language to work with.
- mratsim 9y agoWhen you say constrained types do you mean generics? You have generics and concepts (similar to C++17) in Nim, not too sure about Ada.
- thesz 9y agoI meant types with constraints, like this one: sum :: Num a => [a] -> a The type variable a is constrained to have implementation of interface Num (integer constant (0), addition, subtraction, etc). These constraints can be much deeper. For example, I can define a function that allow me to add two somethings if their "regions" (a property I know how to compute) is equal and the result will be produced in "region" of first argument: add :: (Region a ~ Region b, Region a ~ Region c) => a -> b -> c One use of something similar is addition of integer values represented by bit vectors in Verilog - you should not add bit vectors from different clock domains, otherwise you get unpredictable results.
- pjmlp 9y agoI also spend some time with stored procedure programming, mostly PL/SQL, most of them are also Ada based, and I find them quite productive, actually.