Re: Static type guy trying to convert

2009-03-12 Thread Raoul Duke
> The Erlang world has a tool called "Dialyzer" w00t. i've always very much liked that approach, and wish it were available for other dynamic languages (maybe qi-lang is somewhat similar). it seems to offer everybody whatever options they want, so we can all get along. sorta in the vein of gradu

Re: Static type guy trying to convert

2009-03-12 Thread Jon Harrop
On Thursday 12 March 2009 06:38:48 Korny Sietsma wrote: > But maybe you use unit tests some other way? How do you use unit > tests to track down bugs? I mean: I had unit tests for each function but they were not identifying the bug so I kept augmenting them with more tests in the hope that I wo

Re: Static type guy trying to convert

2009-03-12 Thread ntu...@googlemail.com
On Mar 12, 3:22 am, Mark Engelberg wrote: > I know of someone who tracked all his bugs in a year of coding in both > Scheme (dynamic) and ML (static).  He said that there was no real > difference.  The kind of bugs that are caught by static type systems > are also quickly identified upon an initi

Re: Static type guy trying to convert

2009-03-11 Thread Korny Sietsma
On Thu, Mar 12, 2009 at 11:26 AM, Jon Harrop wrote: > IME, the trouble can be well worth it. I once wasted two weeks trying to track > down bugs in a thousand lines of code using unit tests and never managed it. > When I finally caved in and tried to leverage the static type system instead, > I f

Re: Static type guy trying to convert

2009-03-11 Thread e
> A while ago, I did some brute force tests on a simple stack-based > language to get some testable metrics on how many unit tests you need > to guarantee correctness. With a language of 7 instructions and a > maximum program size of 8 instructions, there are about 6.7 million > program permutation

Re: Static type guy trying to convert

2009-03-11 Thread e
This is a nice post . . . would the partially static typing come from the IDE? That seems like the trend right now, but then you gotta get a good IDE, and no two would ever be the same, which I think is controversial. On Wed, Mar 11, 2009 at 4:27 PM, chris wrote: > > I don't think it is impossi

Re: Static type guy trying to convert

2009-03-11 Thread James Reeves
On Mar 12, 12:26 am, Jon Harrop wrote: > On Thursday 12 March 2009 00:01:43 James Reeves wrote: > > This doesn't have to be the case. There is nothing inherently magical > > about a types that makes them more concise to define than a unit test. > > Type inference: you don't write anything and the

Re: Static type guy trying to convert

2009-03-11 Thread Mark Engelberg
I know of someone who tracked all his bugs in a year of coding in both Scheme (dynamic) and ML (static). He said that there was no real difference. The kind of bugs that are caught by static type systems are also quickly identified upon an initial run with a few basic test cases in a dynamic typ

Re: Static type guy trying to convert

2009-03-11 Thread Jon Harrop
On Thursday 12 March 2009 00:28:06 Raoul Duke wrote: > i mean, one of the major benefits, i think, of immutability is that > you are in so many ways actually reducing the cognitive load that you > are under when running mental simulations of your program -- which is > a crucial part of being a pro

Re: Static type guy trying to convert

2009-03-11 Thread Raoul Duke
> On the other hand, I do seem to get less bugs than with Ruby, so > perhaps immutability is a more significant factor than static typing > when it comes to creating robust applications. in a way, i can totally believe that, and it sounds really good, even if it isn't true :-) i mean, one of the

Re: Static type guy trying to convert

2009-03-11 Thread Jon Harrop
On Thursday 12 March 2009 00:01:43 James Reeves wrote: > On Mar 11, 2:31 am, Jon Harrop wrote: > > > 2. The whole thing does not need to be complete or even functional for > > > you to start unit testing. > > > > Apples and oranges: unit tests are not the same between dynamic and > > static code

Re: Static type guy trying to convert

2009-03-11 Thread James Reeves
On Mar 11, 2:31 am, Jon Harrop wrote: > > 2. The whole thing does not need to be complete or even functional for > > you to start unit testing. > > Apples and oranges: unit tests are not the same between dynamic and static > code bases because dynamic code bases rely upon a huge number of additio

Re: Static type guy trying to convert

2009-03-11 Thread Joshua
You can get those warm fuzzies back when you develop in an IDE such as Netbeans, IntelliJ, or Eclipse. They can compile the code and provide some feedback. The plugins are kinda young, but they may provide enough to help make the jump. Joshua On Mar 10, 1:16 am, zoltar wrote: > Hey everyone. I'

Re: Static type guy trying to convert

2009-03-11 Thread Raffael Cavallaro
On Mar 11, 4:17 pm, "ntu...@googlemail.com" wrote: > I would appreciate it if you would consider his arguments instead of > discrediting him. His post is not insulting and contains valid > arguments. So please don't shoot the messenger. When the "messenger" is habitually insulting he loses cr

Re: Static type guy trying to convert

2009-03-11 Thread Jon Harrop
On Wednesday 11 March 2009 20:27:15 chris wrote: > Lets take this discussion forward and think of how we could > incrementally add the important benefits of strongly typed and > inferred systems like ML, Haskell, and F# to Clojure while keeping the > very beautiful and clean syntax and minimal men

Re: Static type guy trying to convert

2009-03-11 Thread chris
I don't think it is impossible to begin adding type inference and stronger typing to clojure or any fully dynamic language. You could begin with a set of runtime tests (such as range of a given number or what keys are in a dictionary). These tests allow you to go from an untyped world to a typed

Re: Static type guy trying to convert

2009-03-11 Thread ntu...@googlemail.com
On Mar 11, 5:26 am, Raffael Cavallaro wrote: > Some of you may not know of Jon's behvior on comp.lang.lisp so some > background will be useful here. I would appreciate it if you would consider his arguments instead of discrediting him. His post is not insulting and contains valid arguments. So p

Re: Static type guy trying to convert

2009-03-11 Thread Jon Harrop
On Wednesday 11 March 2009 18:35:46 Cosmin Stejerean wrote: > On Wed, Mar 11, 2009 at 1:03 PM, Jon Harrop wrote: > > Another red herring: you are describing a disadvantage of nominal over > > structural typing. Not dynamic vs static typing. > > You are correct, my apologies. I was trying to show

Re: Static type guy trying to convert

2009-03-11 Thread Cosmin Stejerean
On Wed, Mar 11, 2009 at 1:03 PM, Jon Harrop wrote: > > On Wednesday 11 March 2009 15:30:01 Cosmin Stejerean wrote: > > Actually it happens a lot in real code and in many non-trivial programs > in > > static typed languages you end up with a proliferation of types that are > > simply there to make

Re: Static type guy trying to convert

2009-03-11 Thread Jon Harrop
On Wednesday 11 March 2009 18:18:59 Raoul Duke wrote: > > Another red herring: you are describing a disadvantage of nominal over > > structural typing. Not dynamic vs static typing. > > there are probably several different arguments being conflated in such > discussions. > > for example, theory v

Re: Static type guy trying to convert

2009-03-11 Thread Raoul Duke
> Another red herring: you are describing a disadvantage of nominal over > structural typing. Not dynamic vs static typing. there are probably several different arguments being conflated in such discussions. for example, theory vs. practice: there is the theory of what in fact are the options f

Re: Static type guy trying to convert

2009-03-11 Thread Jon Harrop
On Wednesday 11 March 2009 15:30:01 Cosmin Stejerean wrote: > Actually it happens a lot in real code and in many non-trivial programs in > static typed languages you end up with a proliferation of types that are > simply there to make the compiler happy. To me it happens very often where > I know

Re: Static type guy trying to convert

2009-03-11 Thread Jon Harrop
On Wednesday 11 March 2009 15:05:39 Konrad Hinsen wrote: > On Mar 11, 2009, at 3:31, Jon Harrop wrote: > > Most of the reasons given in this thread were red herrings and many > > of static > > typing's real issues were not even touched upon: > > ... > > I'd add two more: > > - Metaprogramming is a

Re: Static type guy trying to convert

2009-03-11 Thread Jay Fields
On Tue, Mar 10, 2009 at 11:44 PM, e wrote: > > > My interest right now in following clojure is to learn ALL the arguments, > including his. > The problems with Jon's criticisms is that they are the same fear, uncertainty and doubt ideas that are repeated time and time again by static language ze

Re: Static type guy trying to convert

2009-03-11 Thread Cosmin Stejerean
On Tue, Mar 10, 2009 at 9:31 PM, Jon Harrop wrote: [...] > > > 2. The whole thing does not need to be complete or even functional for > > you to start unit testing. > > Apples and oranges: unit tests are not the same between dynamic and static > code bases because dynamic code bases rely upon a

Re: Static type guy trying to convert

2009-03-11 Thread Konrad Hinsen
On Mar 11, 2009, at 3:31, Jon Harrop wrote: > Most of the reasons given in this thread were red herrings and many > of static > typing's real issues were not even touched upon: ... I'd add two more: - Metaprogramming is a lot more complicated with static typing. Look at MetaOCaml or Templa

Re: Static type guy trying to convert

2009-03-11 Thread Jon Harrop
On Wednesday 11 March 2009 04:44:17 e wrote: > ...Afterall he could have chosen a dynamically typed language for his > business if he had wanted to... FWIW, my company ships products written in many different languages including dynamic languages and I have been programming in dynamic languages

Re: Static type guy trying to convert

2009-03-11 Thread Laurent PETIT
2009/3/11 mikel mev...@mac.com > > > > Saying that something sucks and suggesting that people who like it are > fools isn't an argument, it's just yanking people's chains to get > attention. Are you talking about Linus's speak against cvs, subversion and their users ? :-) ok, this was just a j

Re: Static type guy trying to convert

2009-03-10 Thread mikel
On Mar 10, 11:44 pm, e wrote: > On Wed, Mar 11, 2009 at 12:26 AM, Raffael Cavallaro < > > > > > > raffaelcavall...@gmail.com> wrote: > [...comments on Harrop's marketing tactics...] > h, that could sound like more of an endorsement than anything he could > have said, himself!  Afterall he

Re: Static type guy trying to convert

2009-03-10 Thread Raffael Cavallaro
On Mar 11, 12:44 am, e wrote: > h, that could sound like more of an endorsement than anything he could > have said, himself!  Afterall he could have chosen a dynamically typed > language for his business if he had wanted to. You have to be an expert in something to run a business selling

Re: Static type guy trying to convert

2009-03-10 Thread e
On Wed, Mar 11, 2009 at 12:26 AM, Raffael Cavallaro < raffaelcavall...@gmail.com> wrote: > > Some of you may not know of Jon's behvior on comp.lang.lisp so some > background will be useful here. > > He runs a business selling ocaml and f# consulting and training > services and materials. He routin

Re: Static type guy trying to convert

2009-03-10 Thread Raffael Cavallaro
Some of you may not know of Jon's behvior on comp.lang.lisp so some background will be useful here. He runs a business selling ocaml and f# consulting and training services and materials. He routinely posts insulting and inflammatory remarks about lispers and lisp in comp.lang.lisp. He admits hi

Re: Static type guy trying to convert

2009-03-10 Thread Jon Harrop
On Tuesday 10 March 2009 13:26:32 Vincent Foley wrote: > Here's my feeling on it (note that I am talking about languages from > the C family, not Haskell or ML). Then the feelings you are describing are specifically about C and are not related to static typing in general. > 1. Like Jason Wolfe

Re: Static type guy trying to convert

2009-03-10 Thread Jon Harrop
On Tuesday 10 March 2009 21:33:38 Mark Engelberg wrote: > A static type system also documents these properties, but you're > restricted to certain concepts that the computer can understand and > prove things about. You'll start to realize that there are concepts > that are difficult or impossible

Re: Static type guy trying to convert

2009-03-10 Thread e
this is an interesting question to me. Seems like there are at least two parts: a) do you like compilation and static code analysis, b) do you like a strong type system? Some has already been said about (a) and more about (b). For me, it's still bizarre in python that I can be running a program

Re: Static type guy trying to convert

2009-03-10 Thread Mark Engelberg
I think the key to feeling confident in dynamically typed code is to go ahead and write out the "contract" for the function in your comments. You should always state what the "domain" and the "range" of the function are, so that you and other people can use the function appropriately. A static t

Re: Static type guy trying to convert

2009-03-10 Thread Raoul Duke
> IDE giving me the most appropriate options. i'm under the updated impression that some Smalltalk IDEs can and do look at the current AST of the system to give you proper completion, rather than giving up because there aren't explicit types. so maybe some such could be done some day for Clojure

Re: Static type guy trying to convert

2009-03-10 Thread falcon
I am in the same boat. However, even more than type safety, I miss my IDE giving me the most appropriate options. I often have objects with many call-backs, it's nice to be able to ctrl+space (in eclipse) and quickly get a list available methods, pressing enter gives you some skeleton code. Clo

Re: Static type guy trying to convert

2009-03-10 Thread chris
http://www.mindview.net/WebLog/log-0025 I am not actually as in favor of untyped programming as this article is, but I can see the points and I agree with most of them. Chris On Mar 10, 10:34 am, zoltar wrote: > On Mar 10, 10:03 am, Vincent Foley wrote: > > > With Clojure you don't need to un

Re: Static type guy trying to convert

2009-03-10 Thread zoltar
On Mar 10, 10:03 am, Vincent Foley wrote: > With Clojure you don't need to understand Monads.  And I don't think > they're hard to understand, I think they're hard to come to grips with > because of what they are capable of. > > Anyway, I hope you enjoy Clojure :) Yes, I know, but I'd like to

Re: Static type guy trying to convert

2009-03-10 Thread Vincent Foley
With Clojure you don't need to understand Monads. And I don't think they're hard to understand, I think they're hard to come to grips with because of what they are capable of. Anyway, I hope you enjoy Clojure :) On Mar 10, 11:30 am, zoltar wrote: > Thanks everyone! That gives me a lot more con

Re: Static type guy trying to convert

2009-03-10 Thread zoltar
Thanks everyone! That gives me a lot more confidence in trying Clojure. There is a certain freedom in not worrying about types. I spend a lot of time in Java trying to get types and type hierarchies right (especially generics). I haven't been doing a lot of unit testing but I can see how that woul

Re: Static type guy trying to convert

2009-03-10 Thread CuppoJava
I just jumped on Clojure five months ago, and I was a little lost without types at first also. Then I've come to realize that types is not as essential to bug-less software as I previously thought it was. For the following reasons: 1) There's less "types" to begin with. I was a Java programmer, a

Re: Static type guy trying to convert

2009-03-10 Thread mikel
On Mar 10, 8:26 am, Vincent Foley wrote: [...snip...] > I'd like to > mention that I'm also a fan of static typing and that to this day, I > still don't know whether I prefer the freedom and flexibility of > dynamic typing or the constraint and safety of static typing. That dichotomy seems t

Re: Static type guy trying to convert

2009-03-10 Thread Vincent Foley
Here's my feeling on it (note that I am talking about languages from the C family, not Haskell or ML). 1. Like Jason Wolfe said, the interactive REPL means that you can manually test a function as soon as you're done writing it, so it's easy to get feedback and know if something breaks. 2. The w

Re: Static type guy trying to convert

2009-03-10 Thread GS
Timothy Pratley wrote: > Jump on in! Just like with swimming the cold soon goes away. [...] Bad analogy. In swimming, the cold returns about half an hour later :) Gavin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Grou

Re: Static type guy trying to convert

2009-03-09 Thread Timothy Pratley
Jump on in! Just like with swimming the cold soon goes away. I found that without types it was mentally taxing to understand many function description. Something that helped me was collecting examples for functions as I came across them: http://en.wikibooks.org/wiki/Clojure_Programming/Examples/A

Re: Static type guy trying to convert

2009-03-09 Thread Jason Wolfe
Hi Curtis, I get my fuzzies from at least a few places: 1. bottom-up, interactive development. This means frequent testing (at the REPL) of individual or small sets of functions, as I write them. 2. assertions liberally sprinkled in key places. 3. multimethods that are difficult to call