|
|
|
|
|
by geon
4231 days ago
|
|
> You can't have an array of Objects, for non-elementary types you get an array of references (pointers) instead, where each array element carries overhead of java.lang.Object. Isn't that true in Objective C as well, though? Or does NSObject have much less overhead? |
|
When you only need one class to do something in iOS (and MacOSX), you might need ten classes in Android (and other Java frameworks).
For example, compare the number of classes to parse xml on iOS (one class: NSXMLParser), vs. the number of packages and classes to parse xml on Android: (javax.xml.datatype.DatatypeConstants, javax.xml.datatype.DatatypeConstants.Field, javax.xml.datatype.DatatypeFactory, javax.xml.datatype.Duration, javax.xml.datatype.XMLGregorianCalendar, javax.xml.namespace.NamespaceContext, javax.xml.parsers.DocumentBuilder, javax.xml.parsers.DocumentFactory, javax.xml.parsers.SAXParser, javax.xml.parsers.SAXParserFactory, javax.xml.parsers.ParserConfigurationException, javax.xml.parsers.FactoryConfigurationError, (I'll skip all the javax.xml.transform packages and classes, since assumedly they wouldn't be used to read xml), javax.xml.validation.Schema, javax.xml.validation.SchemaFactory, javax.xml.validation.SchemaFactoryLoader, javax.xml.validation.TypeInfoProvider, javax.xml.validation.Validator, javax.xml.validation.ValidatorHandler, javax.xml.xpath.XPath, javax.xml.xpath.XPathExpression, javax.xml.xpath.XPathFunction, javax.xml.xpath.XPathFunctionResolver, javax.xml.xpath.XPathVariableResolver, javax.xml.xpath.XPathConstants, javax.xml.xpath.XPathFactory, javax.xml.xpath.XPathException, javax.xml.xpath.XPathExpressionException, javax.xml.xpath.XPathFactoryConfigurationException, javax.xml.xpath.XPathFunctionException, amongst a lot of other classes).