In the early days, we were even hesitant to use enums instead of ints, and also tended to use concrete classes instead of interfaces (huge different in this case). I think it was a valid concern at the time.
As for type safety, I would argue that Android's API's are "more" type safe than usual in the sense that they make resource look ups type safe (if a resource gets removed or renamed, your code won't compile until you adjust it). -- Cédric On Sat, Jun 2, 2012 at 12:56 PM, Andreas Petersson <[email protected]>wrote: > Something came back to my mind while listening to the latest episode. > The whole Android API is cluttered with int constants and Api signatures. > why does something like this even compile: myTextView.setBackgroundColor(* > *R.id.redTextBox) > > why does android not use interfaces/type safety more often? > > has it something to do with performance? > > also, i see byte[] very often especially when dealing with camera and > bitmaps. my impression with the jvm is that int[] or even long[] will bring > a significant speedup. > please enlighten me. > > br > Andreas > > -- > You received this message because you are subscribed to the Google Groups > "Java Posse" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to javaposse+unsubscribe@** > googlegroups.com <javaposse%[email protected]>. > For more options, visit this group at http://groups.google.com/** > group/javaposse?hl=en <http://groups.google.com/group/javaposse?hl=en>. > > -- You received this message because you are subscribed to the Google Groups "Java Posse" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/javaposse?hl=en.
