News for hackers. Stuff that matters.
Re:Embracing Swift for Deep Learning by ToBeBannedSoon on Sunday April 21, 2019 @06:30PM (#19714995)
Python 3.6+ does have type annotations and multiple static analysis tools for type checking. Only an ignorant or biased person would yell at Python for flaws it doesn't have. For crucial business logic, one also writes unit tests.
Re:Embracing Swift for Deep Learning by beepy on Sunday April 21, 2019 @06:57PM (#19715099)
From the link:

> recent versions of Python have added type annotations that optionally allow the programmer to specify the types used in a program. However, Python’s type system is not capable of expressing many types and type relationships, does not do any automated typing, and can not reliably check all types at compile time. Therefore, using types in Python requires a lot of extra code, but falls far short of the level of type safety that other languages can provide.

Re:Embracing Swift for Deep Learning by petilon on Sunday April 21, 2019 @06:45PM (#19715046)
Unit tests are not an adequate replacement for compile-time checks performed by a compiler. The former is lax and expensive, the latter is thorough and inexpensive.
Re:Embracing Swift for Deep Learning by soVeryTired on Sunday April 21, 2019 @06:49PM (#19715069)
Language flamewars are silly.

Sometimes python is appropriate for production code, weak type system or no. Sometimes it isn't. As a project gets larger, more complex, and more interconnected with other things, static type systems become more useful.

End of story, surely? Didn't we all know that already?

Re:Embracing Swift for Deep Learning by rahulrrixe on Sunday April 21, 2019 @07:51PM (#19715299)
But you loose so much flexibility. When you start working on a problem, you want your language should give you as little headache as it can with minimum rules and constraints. Then on iteration you can improve like having type annotation, unit tests etc.

You can write perfectly fine production level code in Python. It like lego block. Start with simple and then add on.

Adding compile type checks comes with its own demerits. I guess here Swift is trying to offer more tool chain on compiler level for model building rather than just being type safe.

Re:Embracing Swift for Deep Learning by woadwarrior01 on Monday April 22, 2019 @06:32AM (#19717794)
I’ve used mypy and pyre on large Python 3.6 codebases and they aren’t even close to type systems in conventional imperative languages (C++, Java, etc) let alone the type systems in the ML family of languages where type system innovations are usually born. I’m sure they’ll get better with time, to an extent.

Currently, programmers are forced to pepper the code with lots of ignore annotation comments and redundant union types, just because the type checkers aren’t smart enough.