News for hackers. Stuff that matters.
Re:Revenge of the Types by rcthompson on Monday August 25, 2014 @01:46PM (#8222907)
What are good examples of languages with specifications and at least two implementations that fully implement the spec?
Re:Revenge of the Types by Joeri on Monday August 25, 2014 @02:16PM (#8223120)
C99 and C++11 have several compliant implementations, as does ECMAScript 5 (javascript).

The benefit of a spec is not so much that all implementations are necessarily completely compliant, it's that you know what the behavior is supposed to be so you can implement to the spec and work around any differences in implementation. Plus, you can report bugs without them being closed as "by design".

Re:Revenge of the Types by CountSessine on Monday August 25, 2014 @02:11PM (#8223081)
Given how complicated any specification for a non-trivial language is, I wonder if there are any. But I think this is beside the point.

Not having a specification for a language pushes every language feature discussion down onto application and library developers 'in situ'. When a developer or library maintainer stumbles onto unexpected interpreter or compiler behavior in a language without a specification, it means that in the short term there's no guidance about how they should deal with it. Do I hack this for Visual C++ in a way that can be removed eventually or do I really have to assume going forward that variadic templates aren't going to be available?

Re:Revenge of the Types by catwell on Tuesday August 26, 2014 @02:39AM (#8225956)
In Lua the user manual is the reference, so if the language does something different, it is considered a bug. If something is not described in the manual then it is an implementation detail (unspecified) and code that relies on it is broken.

This led to several alternative implementations, among which at least one (LuaJIT) implements completely a version of the language (Lua 5.1).

Re:Revenge of the Types by NateDad on Monday August 25, 2014 @03:42PM (#8223728)
Go has gc and gccgo. They made two implementations to keep the spec honest and not just "whatever the compiler does".
Re:Revenge of the Types by chaoky on Monday August 25, 2014 @06:08PM (#8224468)
Common Lisp, for sure
Re:Revenge of the Types by rcthompson on Tuesday August 26, 2014 @02:19PM (#8228639)
Yes, the various Lisps were the first possible examples I came up with (I think Scheme probably qualifies as well).