Juergen Schoenwaelder writes: >On Tue, Jun 30, 2015 at 10:00:11AM -0400, Phil Shafer wrote: >> Juergen Schoenwaelder writes: >> >I am not afraid of nonsense in data models since nonsense will not be >> >implemented. I would leave it to compiler writers to warn about >> >nonsense constructions a compiler can detect without requiring a >> >statement in the language definition trying to prohibit nonsense. >> >There are many ways to define degenerated lists in YANG; ruling out >> >one of them does not help that much and it creates inconsistencies - >> >why is one way to define a degenerated list forbidden but the others >> >are legal? >> >> This really isn't the way standards work, right? "gcc" can warn when >> I do something like "int foo(){ return 0; return 1;}" but it can't >> decide that it's invalid or refuse to generate a .o file for it. >> I can choose to tighten gcc's restrictions with -W flags, but when >> code compiles under gcc and doesn't under clang, when one or the >> other isn't implementing the C standard. > >I don't get it. I do not think the C standard says the example above >is invalid C. It is perhaps pointless C or likely a coding error but >as long as the semantics are clear, things are well defined.
Your comment was "nonsense will not be implemented"; my point was that tool chains will still need to implement it regardless of whether we think it will see use. If it's legal nonsense, a tool chain that doesn't support it is broken. Thanks, Phil _______________________________________________ netmod mailing list netmod@ietf.org https://www.ietf.org/mailman/listinfo/netmod