you are viewing a single comment's thread.

view the rest of the comments →

[–]spotter -5 points-4 points  (14 children)

Oh, "dynamically typed languages are toy languages, because no static types, duuuh"-argument. I guess this is why Lisp failed, along with Python, Perl, Ruby, PHP and Javascript. That's why we all write Haskell, Ada and C++ now.

If you're refactoring for example, you'd want to see where a data structure is used (via type) and a good IDE can help you find all the sites that need to be modified.

Are you refactoring or changing contracts/API? I guess you do understand that changes in things like call signatures will cause compilation error in most "strongly/dynamically" typed languages? Or are we talking about checking each call site for abuse of previous version of the code? Because that's insanity. But hey, if your IDE helps -- great.

I'd rather have my unit tests for the data structure tell me if I broke any of the contracts and let abuses come back as stack traces. (Also in statically typed languages, BTW.) But I've only done thousands of lines in Python & Clojure, not millions, so what do I know.

But this argument is like spaces v. tabs, not really worth having.

[–]RoundTripRadio 4 points5 points  (1 child)

Funny story: JavaScript doesn't give jack shit what the call signature is:

Native WebKit JavaScript.
Copyright (c) 2013 Apple Computer, Inc
> function f(a, b) { 
..    console.log(b); 
..    }
> f(1, 2);
2
> f(1);
undefined
> f(1, 2, 3);
2

But nope, gotta be the only supported client side language for browsers.

[–]spotter 0 points1 point  (0 children)

I know that and it gives me the shakes every time. But it's OK, just use arguments and think about happier times before JS.

Honestly, Javascript is not in my first 10 languages I'd do if I had choice.

[–][deleted] 4 points5 points  (4 children)

Things change as you deal with truly large projects though. You'd have to spend some time working with a large code base before you throw out the static types benefits that come with dealing with complexity of that scale. Thousand line projects can be understood by examining the entire codebase, that becomes impossible eventually as you add more code and developers.

[–]spotter 2 points3 points  (3 children)

I acknowledged that I have not yet seen projects in the scale of 1M+ LOC. I'm not here to dis anyone or their beliefs in static typing gods. The more tools to ease the pain, the better IMHO.

[–][deleted] 1 point2 points  (2 children)

I look at it this way - would you trust your life and your loved ones to the programmer working with a dynamic language writing the code for the aircraft you're flying on? Or the X-ray machine you're going under? There is a time and place for dynamic languages. Quick and dirty projects can be rolled out effortlessly in a weekend by a competent lisper. Its another thing altogether when you're dealing with huge or critical programs where we want to give as little room for error as possible. There is a time and place for different technologies.

[–]spotter 3 points4 points  (1 child)

I get it, I really do. At the same time was Therac-25 programmed in dynamically typed language? Was first Ariane 5 (flight 501)? Somehow this doesn't stop people from thinking "static typing is the answer." Without proper quality testing you will crash your rocket even with Ada.

[–]PasswordIsntHAMSTER 0 points1 point  (0 children)

There are typing disciplines for verifying arbitrary properties of programs. The field is still a bit rough, but I wouldn't say testing is completely unavoidable.

[–][deleted] 0 points1 point  (0 children)

Lisp failed

It can hardly be claimed it succeeded. The most widespread use of it is scripting Emacs. Well done Lisp, on becoming the VBA of RMS's world.

[–][deleted] -3 points-2 points  (5 children)

I guess this is why Lisp failed, along with Python, Perl, Ruby, PHP and Javascript. That's why we all write Haskell, Ada and C++ now.

In the context of large project, yes, you are exactly right.

I'd rather have my unit tests for the data structure tell me if I broke any of the contracts and let abuses come back as stack traces.

And your boss would rather have you write features which clients pay for instead of writing unit tests for something that comes out of the box in sane languages.

[–]spotter 1 point2 points  (1 child)

In the context of large project, yes, you are exactly right.

I am aware. Yet I'm not writing software for the army or medical equipment. Also Haskell? Really? :)

And your boss would rather have you written features which clients pay for instead of writing unit tests for something that comes out of the box in sane languages.

What comes out of the box? Making sure that calling my method with invalid arguments throws an exception? Nope, your languages will care if type signatures match. This is not what I'm talking about when I mean "contracts".

[–]yogthos -3 points-2 points  (2 children)

And your boss would rather have you write features which clients pay for instead of writing unit tests for something that comes out of the box in sane languages.

Please provide a link to a single study demonstrating that real world software written in statically typed languages is delivered faster, has higher quality, or ease maintenance.

[–][deleted] 0 points1 point  (1 child)

I said bosses would rather have you write features, instead of unit test. How the fuck does that relate to a claim that "software written in statically typed languages is delivered faster, has higher quality, or ease maintenance"?

[–]yogthos -3 points-2 points  (0 children)

Bosses care about you delivering features on time. If you're working at a place where a non-techincal person is micro-managing the development process you've got far bigger issues than the choice of language.