The tag has no wiki summary.

learn more… | top users | synonyms

-1
votes
6answers
804 views

Converting an empty string to a number [closed]

If you are designing a function which should conver a string to an integer, how would you convert an empty string? The question is only about this one particular input value (empty string). Between ...
7
votes
3answers
680 views

Is relying on implicit argument conversion considered dangerous?

C++ has a feature (I cannot figure out the proper name of it), that automatically calls matching constructors of parameter types if the argument types are not the expected ones. A very basic example ...
14
votes
3answers
4k views

What is the name of ** in python?

When programming Python I sometimes do a ** to make a conversion. I understand what it does but what data structures am I manipulating? A dict and what is the other? An array? Is there a name for the ...
6
votes
2answers
929 views

The need for Explicit Type Conversion in C#

Consider the following code: DerivedClass drbObj = (DerivedClass)obj; Here obj is of type Object and this is reasonable since Object is the base type of every Class in C#. Here, since the type of ...
3
votes
3answers
601 views

What is the accepted best practice for Java type conversions?

What is the current best practice for all the type conversions necessary in a Java web application? For example, HttpServletRequest.getParameters(...) returns String[], but Hibernate does not allow ...