Silverware wrote: ↑Mon Feb 26, 2018 3:36 pm
In C, you have to check the type of the input, see that it is a string, convert it to an int, because you were expecting an int. See that failed, so try converting to a Float, since that worked, and you were expecting an int, you now have to convert to an Int, and then start working with it.
Yeah no, you are trying to stretch it too hard. You obviously work with strings from the very beginning. You parse it into an int, since it fails you reject the request with the message that you were expecting an int. That's the whole deal. Anything else is a terrible practice. Your code will accept things like true or [ 1 ] as valid inputs. Did you foresee that? Whoops, guess you just introduced a subtle bug into your public application, but who cares, amirite?
However, you brought up a good point about interfacing with other formats. Working with formats as such as xml is less tedious when you are using a dynamic language. Languages such as C# have a solution for exactly that situation as well allowing to imitate dynamic languages. That's a totally valid use, although things like json schema and xml schema show that you could just map those formats to a static data structure definition.
Silverware wrote: ↑Mon Feb 26, 2018 3:36 pm
So... your argument boils down to.
"I don't convert my variables between types so I don't need Weakly Typed languages"
That's not what my argument was at all, no. To reiterate my point: the compiler helps you a ton when developing projects of any size. Missing out on that form of automated error-checking in a big project is unwise. Either way people end up with either type annotations or a ton of unit tests. Both of those are extra work which could be avoid by using a statically compiled language.
Dinosawer wrote: ↑Mon Feb 26, 2018 3:35 pm
And you could do that research and actually click the installer link further to:
https://www.wxpython.org/pages/downloads/
where I got that command from, because I did in fact do the research before posting I even checked if my IDE found the package
Yeah like I said this is for a new version which appeared fairly recently and when I developed my application 3-4 years ago I was surprised I couldn't just do "pip install wxWidgets". Pretty sure the same thing stopped me from even trying pyQt and that seems to be installable from pip now as well. Which is good!
Cornflakes_91 wrote: ↑Mon Feb 26, 2018 3:29 pm
now you are using ad hominems because your example didnt get your point across?
No, because you seem to only answer to that specific message taking it out of context. If you read the previous posts from me and other people you'll see that we are talking exactly about that stuff, so your condescending "ever heard of" is out of place.