Should Your Start Up Go Static or Dynamic?
mahdiyusuf.com
mahdiyusuf.com
Also, his graph of languages doesn't really make any sense at all. If he just kept it as a division into groups, it would make sense, but it really looks like he's trying to say that C++ has a "weaker" (whatever that means) type system than C or that Haskell has a "weaker" type system than Scala.
Also, static typing is not always for robustness; it can also increase performance. C is a perfect example of this--it is one of the easiest languages to write bugs in but is also really fast.
Overall, I was not terribly impressed with this article--it gave poor definitions and little new insight (as far as I could tell, it just reiterated the same old cliches about static vs dynamic types without any anecdotes, experience or advice).
Add in the ability of haskell to let you write your own control structures and do higher-level programming, and I find myself exploring and refactoring my code much more than I do when using a dynamic language.
It was never said that static typing is for robustness it does decrease the occurrence of runtime errors.
I think the overall point was just to give insight on what people don't consider when making a programming language choice.
Erm... Did the author test this code before making this assertion?
>>> def get_first_problem(problems):
... for problem in problems:
... return problam
...
>>> get_first_problem([1,2,3])
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<stdin>", line 3, in get_first_problem
NameError: global name 'problam' is not defined def get_first_problem(problems):
for problem in problems:
problam = problem + 1
return problam
but there's nothing wrong with this, I assume he meant to return problem instead of problam which would produce an unexpected result without having added 1. Nothing a unit test wouldn't catch though :)Edit: formatting
Not exactly true. You do need to declare variables in some dynamic languages (var in JavaScript, for example), but you don't need to declare their type.
Anyhow, the whole question is a little irrelevant. The language you pick for your startup is among the factors least important to its success. Just pick a reasonable language that you are productive with, that has library support for the stuff you need, and that works well on the operating systems you care about, and that will be fine.
You can declare variables in JavaScript, but you don't need to. JavaScript is bad example here, as the var keyword is not really used for declaring but for scoping the variable.
I'm using Go right now, it is amazing, blowing both Python and C# out of the water, with speed of development, robustness and maintainability.
Or alternately how F# is less static than Haskell or weaker than Scala?
Or am I just reading too much into the chart?
The graph makes no sense to me.
* Languages that entirely lack the needed libraries to perform a library-intensive task. (e.g. a CRUD web app in C++) * Languages that you do not know * Langauges that you only want to use because they're "hip" right now
There are two kinds of language comparisons I've seen:
1. Language comparisons posted by dabblers, which you could scrape together by reading Wikipedia. You see a lot of poor logic and unsatisfying definitions, because if the logic were sound and the definitions useful, a dabbler would never have enough expertise to write the post.
2. Language comparisons by experts, which restrict the discussion to history, the underlying logic of type theory, or empirical observations about a small set of languages.
When you are cash strapped, speeding up time to market often becomes the number one priority.