tag:blogger.com,1999:blog-684183198890094283.post2556054831733186094..comments2023-11-05T06:12:59.718-05:00Comments on S.Lott-Software Architect: Statically Typed Language NonsenseS.Lotthttp://www.blogger.com/profile/06337323642834330176noreply@blogger.comBlogger6125tag:blogger.com,1999:blog-684183198890094283.post-62515618653926816892011-12-26T15:38:19.907-05:002011-12-26T15:38:19.907-05:00Types Considered Harmful by Lamport
http://resear...Types Considered Harmful by Lamport<br /><br />http://research.microsoft.com/en-us/um/people/lamport/tla/notes.htmlRobert Lucentehttps://www.blogger.com/profile/12434992671749777590noreply@blogger.comtag:blogger.com,1999:blog-684183198890094283.post-23704373043314373472011-12-26T15:27:15.938-05:002011-12-26T15:27:15.938-05:00Should Your Specification Language Be Typed? (wit...Should Your Specification Language Be Typed? (with Larry Paulson)<br />ACM Transactions on Programming Languages and Systems 21, 3 (May 1999) 502-526. Also appeared as SRC Research Report 147.<br /><br />http://research.microsoft.com/en-us/um/people/lamport/pubs/lamport-types.pdfRobert Lucentehttps://www.blogger.com/profile/12434992671749777590noreply@blogger.comtag:blogger.com,1999:blog-684183198890094283.post-34072280024157786822011-12-15T15:28:03.888-05:002011-12-15T15:28:03.888-05:00What criteria are being used to judge static versu...What criteria are being used to judge static versus dynamic languages?<br /><br /> <br /><br />What is the context in which the criteria are being applied?<br /><br /> <br /><br />In my opinion, it is a design choice. What comes to mind is the quote from spider man “with great power comes great responsibility”. The good news is that dynamic languages allow for greater flexibility. The bad news is that the greater flexibility allows you to get yourself into more trouble.Robert Lucentehttps://www.blogger.com/profile/12434992671749777590noreply@blogger.comtag:blogger.com,1999:blog-684183198890094283.post-55711087449349838052011-12-09T13:39:10.885-05:002011-12-09T13:39:10.885-05:00@Luke I'd argue that it is not 100% coverage a...@Luke I'd argue that it is not 100% coverage as it does not verify the logic of what happens if val > 10.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-684183198890094283.post-78835881143392125032011-12-09T13:36:30.290-05:002011-12-09T13:36:30.290-05:00"but I've dabbled in Haskell and this oft..."but I've dabbled in Haskell and this oft-repeated argument only goes so far"<br /><br />True, but Haskell is at the very far end of the scale in terms of what its type system is capable of. When you make an assertion that a statically typed language like, say, Java, is inherently safer, it's a more problematic proposition. <br /><br />Interestingly enough, Haskell's type system can actually aid you in writing your test suite (see, for example QuickCheck, which can generate test caes for you).mazelifehttps://www.blogger.com/profile/00844014917173749621noreply@blogger.comtag:blogger.com,1999:blog-684183198890094283.post-44399681409869909732011-12-09T12:02:48.058-05:002011-12-09T12:02:48.058-05:00I love Python myself, but I've dabbled in Hask...I love Python myself, but I've dabbled in Haskell and this oft-repeated argument only goes so far. You could equally say that no test suite is a substitute for static typing!<br /><br />For example, the following code has a type level bug (class Bar has a method missing), despite a test suite with 100% coverage:<br /><br />https://gist.github.com/1452367<br /><br />The problem is that tests only test code works for one value - an infinitesimal fraction of the possible number of values. Languages with strong static typing systems can enforce checks for *every* value, and, in the hands of someone skilled, can be used to make remarkable guarantees about a program that would be extremely difficult/impossible to do using a test suite. <br /><br />For example, the guarantees made by STM code in Haskell - see http://book.realworldhaskell.org/read/software-transactional-memory.html section "STM and safety" - these checks are impossible to do using tests.Luke Planthttps://www.blogger.com/profile/10988266347497131512noreply@blogger.com