2 ms·
C/Java-type strong languages have the downside that they're super redundant. Typing "MyObject myObject = new MyObject();" is not fun in your free time. The same
by astrange 11y ago
C/Java-type strong languages have the downside that they're super redundant. Typing "MyObject myObject = new MyObject();" is not fun in your free time. The same goes for any other required proof in your program, when you already know you're right.
Hey, remember this guy? He used to be pretty famous, you know.
https://sites.google.com/site/steveyegge2/is-weak-typing-strong-enough https://sites.google.com/site/steveyegge2/is-weak-typing-str...
http://steve-yegge.blogspot.com/2008/05/dynamic-languages-strike-back.html http://steve-yegge.blogspot.com/2008/05/dynamic-languages-st...
- campers 11y agoKotlin on the JVM is a nice improvement over Java, still statically typed, the compiler infers the type for obj. var obj = MyObject() ... obj.foo() So you could change the obj instantiation to a different type and as long as the new type has foo() too then you're good to go. Also you can have your typed properties stored in a map, which you could also add other values to dynamically at runtime. from https://kotlinlang.org/docs/reference/delegated-properties.html https://kotlinlang.org/docs/reference/delegated-properties.h... class MutableUser(val map: MutableMap<String, Any?>) { var name: String by map var age: Int by map } I haven't used Scala but its (Duck)Structual Typing seems like it would get closer again to a dynamic typing feel with static types. Java is pretty verbose and limited in ways, and many devs having backgrounds in EJBs and Struts doesn't help. It would be interesting to see the same side-by-side project comparison in those links with a team using Scala well. Anyway thats all coming from my bias of having done 12 years of Java and 1 year of full Javascript with Angular.
- swah 11y agoStevey would criticize languages left and right, though. I wonder if he is coding in dynamic languages at Google nowadays... Most likely he is writing Go while complaining about it. (miss you stevey please resume writing)
- astrange 11y agoNeither of these are even the article I was thinking of. There was one with the same method written in Java and Perl, doing the same thing, and both obviously correct. But the Perl one was much much shorter because you didn't have to type any types.