hello I've been scrounging around the web looking for various typing practices of Erlang programs and there seem to be a few... although its somewhat difficult to find a solid source of info namely Im looking for practical info about:
1."-specs" - this one looks pretty attractive. a few places mention that the functions that have an associated -specs directive with it are checked at compile time(for correct type usage)... I cant seem to find more info on how to use it (which tool to use - Dialyzer,TypEr?). Im really eager to create a small parser/code-gen that would generate these "specs" from function declarations of the form - functionName(param1 :List, param2 :Tuple) ->...
I have not seen if -spec supports abstract types (user declared types - "Car" type - {car,{weight,},{height,},{maxSpeed,_}}
2."-deftype" directive http://www.sics.se/~joe/bluetail/vol1/v1_oo.html (thats where its being mentioned)
Erlang would become so much more powerful for me if I could start typing things and have them be checked at compile time... for run-time the parser/code-gen I mentioned above would generate guard type checks in the output sourcecode