Re: Test first as specification



Daniel,

> Do you know of any prior experience with specifying a programming
> language by tests?

I'm not aware of any attempt to do exactly that, but there are languages
for which a comprehensive test suite was built in parallel with the
language; XSLT comes to mind.

It's much easier to find cases where a comprehensive test suite was
built after the fact, and is useful to the original implementors, to
vendors of "compliant" alternatives, and even to end users. Ada, Lisp,
Fortran, Java - most prominent languages have test suites.

Many TDD practitioners report, and my experience tends to confirm, that
developing comprehensive test suites after the fact and results in tests
that are harder to write and maintain, and which don't read as well. I
wouldn't be surprised if someone finally took the hint and wrote a
language test-first - not necessarily TDD, but at least building the
test suite systematically in parallel with the implementation.

"Specifying by tests" sounds a bit more ambitious, and ambiguous. There
are different areas to specify, more or less independent of each other;
the language syntax, the semantics with respect to some abstract
machine, the binary code generated, features such as garbage
collection...

Laurent
.



Relevant Pages

  • Re: Report enhancements
    ... >> PERFORM outside the contexts of inline PERFORMs. ... > appropriate to the language. ... code that is currently *within* an in-line PERFORM to a context *outside*, ... and PERFORM that code by specifying the explicit PERFORM range. ...
    (comp.lang.cobol)
  • low level networking in python
    ... pcap.i:72: Warning: Specifying the language name in %typemap is ... deprecated - use #ifdef SWIGinstead. ...
    (comp.lang.python)
  • Re: Moore on Skolems Paradox
    ... >> David C. Ullrich ... >language" is assigning a reference to all of the terms that we learn. ... >language+ the interpretation given to it as a part of learning the ... >purely formal system, by specifying ranges for the variables, ...
    (sci.logic)
  • Re: The Elements of Fortran Style
    ... Style', where is XX is Java, C#, C++ and UML (e.g. ... without specifying the language. ... Spring it on them as a surprise. ...
    (comp.lang.fortran)
  • Re: Archimedean Axiom and second order logic
    ... Saying that the first-order theory of the reals is decidable does not ... is what I mean by specifying the language. ...
    (sci.math)