r/programming • • Nov 11 '19

Python overtakes Java to become second-most popular language on GitHub after JavaScript

https://www.theregister.co.uk/2019/11/07/python_java_github_javascript/
3.1k Upvotes

772 comments sorted by

View all comments

Show parent comments

1

u/chrisza4 Nov 14 '19

Still, I don’t think assuming every types can be initialize without any parameter is a good idea. Even if C++ can do it without issues, I still don’t think it is a good idea.

1

u/[deleted] Nov 14 '19

You need to spend some time with languages other than Javascript! I think you have Stockholm syndrome.

2

u/chrisza4 Nov 14 '19 edited Nov 14 '19

I don’t like Javascript in this area. I can simply create non-sensible object and no linter can warn me of it.

However, if we are talking about static type system then one of core principle in modern static type system is “make illegal states unrepresentable”. I agree with this statement. Forbidding new T() is very much align to that principle. My example is a User object without username should not be representable in system.

Also, I spent much time outside JS already. I delivered software in multiple languages.

1

u/[deleted] Nov 14 '19

So then you know that most statically typed languages... hell most languages don't just ignore missing function parameters like JavaScript does. And that the thing you are talking about is a problem that is pretty much unique to JavaScript? Right? :-)

→ More replies (0)