News for hackers. Stuff that matters.
Re:Electron considered harmful by to3m on Thursday November 24, 2016 @01:17PM (#13031806)
"a variable is not required to have its type declared nor are types associated with properties" (ECMAScript 2016 spec, 4.2)
Re:Electron considered harmful by tlrobinson on Thursday November 24, 2016 @01:25PM (#13031864)
Are you suggesting all dynamically typed languages are "terrible"?
Re:Electron considered harmful by marcosdumay on Thursday November 24, 2016 @02:18PM (#13032194)
The only languages I can think that share those properties are Perl (5, don't know about 6) and the retired Visual Basic.

There is more there than dynamic typing.

Re:Electron considered harmful by tlrobinson on Thursday November 24, 2016 @03:03PM (#13032427)
Not sure what I'm missing. Ruby? Python?
Re:Electron considered harmful by marcosdumay on Friday November 25, 2016 @05:22AM (#13035648)
You are missing this part: nor are types associated with properties.

Ruby and Python do not fit it.

Re:Electron considered harmful by tlrobinson on Friday November 25, 2016 @06:51AM (#13036060)
You can assign values of different types to the same property in those languages, no?
Re:Electron considered harmful by marcosdumay on Monday November 28, 2016 @07:42AM (#13055028)
Types dictate¹ what properties are available.

1 - Or, in the case of Python, mostly dictate.

Re:Electron considered harmful by errantspark on Thursday November 24, 2016 @01:29PM (#13031893)
Cute. Smalltalk and LISP are terrible too huh?
Re:Electron considered harmful by to3m on Thursday November 24, 2016 @01:53PM (#13032066)
Lisp is marginally better, because it tries less hard to work around type mismatches (so something like (+ 1 "") is an error). But it suffers from the same fundamental problem: no type checks until runtime.

It's fine to have some kind of option for data whose type isn't known until runtime. This stuff happens, and languages that insist there's no such thing make dealing with it more difficult. But this is the rarer case! Why optimise for it rather than for the more common one?

Re:Electron considered harmful by kazinator on Thursday November 24, 2016 @02:51PM (#13032361)
What Lisp are you developing with? Mature "industrial strength" Lisp compilers do perform type checks prior to run time.

Dynamic typing isn't optimization; dynamic typing without any static analysis is the utter lack of optimization.