Re:Ask HN: If I learn one programming language, what should ...
by Blackthorn on Thursday April 30, 2015 @11:09AM
(#9465513)
In my experience/opinion: get over a certain number of lines of code and the type system starts getting in the way rather than getting out of the way. This number is not obvious and is very easy to pass without realizing it until it's too late.
[ Parent
| on HN ]
Re:Ask HN: If I learn one programming language, what should ...
by itsybitsycoder on Thursday April 30, 2015 @12:50PM
(#9466194)
Hey, not arguing, just curious, do you have some examples of times where the type system has gotten in the way? And what languages you prefer to use for production systems that don't have those problems?
Re:Ask HN: If I learn one programming language, what should ...
by yen223 on Thursday April 30, 2015 @08:19PM
(#9468525)
Simple example: Say you're working with an external library. And say you need to work with this function:
def convert_to_int(val):
....
What type should val be? Do you pass the object, or a string representation of the object, or...?The problem with Python - and non-statically-typed languages in general - is that function signatures don't need to be defined upfront, which leaves it up to the programmer to figure out the inner workings of the functions. This is a huge pain point when working with other people's code.
Python 3 introduced function annotations, which is great. But again, the problem here is that function annotations are opt-in. It's still up to the developer to add the annotations.
Re:Ask HN: If I learn one programming language, what should ...
by Blackthorn on Friday May 01, 2015 @12:49AM
(#9469524)
I can't give concrete examples because it's closed source code. But my personal biggest issue is class inheritance. It just becomes a complete mess. Very difficult to find what is set where, what is overridden where, what gets called where.
I know I'm going to get some crap for this, but for big prod systems I prefer C++.
Re:Ask HN: If I learn one programming language, what should ...
by gamechangr on Thursday April 30, 2015 @04:19PM
(#9467405)
Blackthorn is spot on. It's not enough to just "upvote" it.