4 ms·
Yeah, you could use my hairline to tell when I’m working with Python... I still haven’t figured out a good typed framework for it yet.
by anonymouse008 6y ago
Yeah, you could use my hairline to tell when I’m working with Python... I still haven’t figured out a good typed framework for it yet.
- kevinarpe 6y agoI also struggle with weak(er) typing in Python, compared to strong(er) typing in C++, Java, or C# -- or even VBA(!). Frustrated like you, I wrote my own open source type checking library for Python. You might be interested to read about it here: https://github.com/kevinarpe/kevinarpe-rambutan3/blob/master/rambutan3/check_args/RCheckArgs.py#L149 https://github.com/kevinarpe/kevinarpe-rambutan3/blob/master... I have used that library on multiple projects for my job. It makes the code run about 50% slower, on average, because all the type checking is done at run-time. I am OK with the slow down because I don't use Python when I need speed. My "developer speed" was greatly improved with stricter types. Finally, this isn't the first time I wrote a type checking library/framework. I did the same for Perl more than 10yrs ago. Unfortunately, that code is proprietary, so not open source. :( The abstract ideas were very similar. Our team was so frustrated with legacy Perl code, so I wrote a type checking library, and we slowly applied it to the code base. About two years later, it was much less painful!
- reissbaker 6y agoTry using Pyre! It's open-source. I use it daily at IG.