News for hackers. Stuff that matters.
Re:Stripe is building a Ruby typechecker by mping on Sunday June 03, 2018 @05:38PM (#17222373)
It's a double edged sword - onboard some devs on "advanced" scala code and let me know how the 10x is working for ya. I also feel that sometimes types cause additional congitive load - you have to mentally model the types and what they do. OTOH I'm pretty sure most people can onboard a js project that's well written.

I think exploratory, debug-based onboarding can be easier with poorly written static lang codebases that dynamic, but then again depends on what convetions are used. I don't care much about autocomplete unless I have to type ReallyLongClassNamesThatAreSupposedToBeMeaningful; besides coding is mostly about avoiding errors, not typing faster.

In the end, whatever floats your boat but dyn langs surely have their place.

Re:Stripe is building a Ruby typechecker by matchbok on Sunday June 03, 2018 @07:04PM (#17222957)
I've heard the "mentally model" argument a few times, and tbh I don't quite understand it. You have to model the object regardless, either with types or tons of extra checks to make sure that object has what you need. I've seen so much javascript code do exactly that because the methods had no idea what they were going to be given. The contract of static typing eases that load, I think.
Re:Stripe is building a Ruby typechecker by mmartinson on Monday June 04, 2018 @02:00AM (#17225031)
Ya for sure. Without getting a debugger into the application code, it sometimes seems completely impossible to look at a piece of dynamic code you're not already familiar with and decide if it's going to work. I've found this especially tough during code reviews for new stuff that make heavy use of abstractions, even when the abstractions are good.
Re:Stripe is building a Ruby typechecker by mping on Monday June 04, 2018 @08:27AM (#17227066)
Personally I feel that my mind is registering what each type does, kinda like building a mental dictionary. Dynlangs also have types but in terms of reading code it feels you can just skim through and skip the details. I guess there is a difference in the cognitive load of reading code and writing code.
Re:Stripe is building a Ruby typechecker by pmontra on Monday June 04, 2018 @04:11AM (#17225565)
Actually the only language I used autocomplete was Java, mainly because it's almost impossible to work in Java without a IDE. However sometimes I turned autocomplete off because those long menus are a pain to see. I don't use a real autocomplete in Emacs with Ruby, Python, Elixir, JavaScript. I use pabbrev which remembers the words I type. It's usually enough not to make typos and it helps to remember the methods/functions.
Re:Stripe is building a Ruby typechecker by jrs95 on Sunday June 03, 2018 @08:41PM (#17223514)
At this point I don’t think anyone sane is seriously advocating for the adoption of Scala.
Re:Stripe is building a Ruby typechecker by hderms on Tuesday June 05, 2018 @10:22AM (#17237831)
What alternatives are there to what Scala provides? What newer language would a 'sane' person advocate?
Re:Stripe is building a Ruby typechecker by jrs95 on Tuesday June 05, 2018 @11:38PM (#17244191)
Unless you really need it for a platform like Spark where there aren't many other options, pretty much any other statically typed language is likely to be more productive in the long run, once you account for the costs of Scala's complexity. Java, Kotlin, C#, whatever. And if you don't need or want the benefits of statically typed languages, then the same is also true for most major dynamic languages. It's difficult to be more specific than that because I don't think there's a very compelling case to use Scala to begin with.
Re:Stripe is building a Ruby typechecker by markmark on Sunday June 03, 2018 @07:19PM (#17223043)
When using a dynamic language you need to know what properties are on an object right? So you can work with them, access them, whatever. So just write it down so everyone else knows too. There, that was easy.
Re:Stripe is building a Ruby typechecker by wtetzner on Sunday June 03, 2018 @10:15PM (#17224019)
If that’s the case, then why not have the compiler check them as well?
Re:Stripe is building a Ruby typechecker by markmark on Sunday June 03, 2018 @10:29PM (#17224081)
Yes, that's exactly my point. Right them down in your program so that the compiler can check them rather than holding them in your head.
Re:Stripe is building a Ruby typechecker by wtetzner on Friday June 08, 2018 @09:20AM (#17264985)
Sorry, I misunderstood your comment.