Op 12-10-11 09:41, Gergely Buday schreef:
Why do datatype declarations have to be repeated in the implementation file
(.ur) when they are already specified in the interface file (.urs)?

They serve different purposes, in the .urs file they are interface
declarations, in the .ur file they are implementation declarations,
this is how I see them.

- Gergely
If that would be the case there would be a mechanism to mark some datatypes as being exported and some others as not exported. Currently, 'marking' is copying the whole datatype definition, which is completely against http://en.wikipedia.org/wiki/Don't_repeat_yourself .

The reason Ur supports meta-programming is that you can still program in a type-safe language while reducing code-size, but this 'feature' goes directly against that.

(Also, just because Standard ML does it in this way, doesn't mean it is the best known way to do it. )

--
Best regards,
  Ron de Bruijn

_______________________________________________
Ur mailing list
[email protected]
http://www.impredicative.com/cgi-bin/mailman/listinfo/ur

Reply via email to