←back to thread

160 points todsacerdoti | 1 comments | | HN request time: 0s | source
Show context
jongjong ◴[] No.41898801[source]
I also love JavaScript.

It's true, it has some really bad parts but you can avoid them.

If I could design the perfect language for myself, it would have the syntax of JavaScript and the portability of JavaScript but it would use Python's strong duck typing approach.

replies(2): >>41898846 #>>41898893 #
anyfoo ◴[] No.41898846[source]
What have static type systems ever done to you, that you avoid them so much?
replies(3): >>41898943 #>>41899010 #>>41910924 #
1. dbrueck ◴[] No.41899010[source]
Not the OP, but the appeal of languages like JS has a lot to do with developer productivity. I write gobs of JS and Python code and the finished programs and libraries can be strongly and statically typed end-to-end. I just don't want to be forced to do it in cases when it doesn't really make a difference, and I don't want to waste time on it when I'm still figuring out the design.

My hope is one of the Next Big Things in programming languages is the widespread adoption of incremental typing systems.

So during the early stages of dev you get the productivity benefits of dynamic and loose/duck typing as much as you want, and then as the code matures - as the design firms up - you begin layering in the type information on different parts of the program (and hopefully the toolset gives you a jump start by suggesting a lot of this type info for you, or maybe you specify it only in places where the type info can't be deduced).

Then those parts of the program (and hopefully eventually the entire program) are strongly and statically typed, and you get all of the associated goodies.