Groups | Search | Server Info | Keyboard shortcuts | Login | Register


Groups > comp.lang.java.programmer > #5328

Re: Android—Why Dalvik?

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.dougwise.org!nntpfeed.proxad.net!proxad.net!feeder1-1.proxad.net!198.186.194.247.MISMATCH!news-out.readnews.com!transit3.readnews.com!postnews.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!spln!extra.newsguy.com!newsp.newsguy.com!news3
From Michael Wojcik <mwojcik@newsguy.com>
Newsgroups comp.lang.java.programmer
Subject Re: Android—Why Dalvik?
Date Wed, 15 Jun 2011 14:01:55 -0400
Organization Micro Focus
Lines 39
Message-ID <itbmha017f9@news3.newsguy.com> (permalink)
References <irs55g$acb$1@lust.ihug.co.nz> <aki3u65e031f0n41s9696v7c223npiu4ru@4ax.com> <irsjma$ig8$1@lust.ihug.co.nz> <irsodu$jp7$1@speranza.aioe.org> <MPG.284ce826ee59e4e9989769@news.justthe.net> <irvift$98d$2@lust.ihug.co.nz> <irvris$orf$1@news.albasani.net> <MPG.284d80d0fd1becca98976b@news.justthe.net> <is0to0$b1k$1@news.albasani.net> <is0vhm$ha$1@speranza.aioe.org> <is17fl$viv$1@news.albasani.net> <is19e0$pae$1@speranza.aioe.org> <is1hrv$dmh$5@lust.ihug.co.nz> <is30d8$5fl$1@dont-email.me> <is3emq$7m1$1@news.albasani.net> <isaq5g11eti@news2.newsguy.com> <isbtt9$dm0$6@lust.ihug.co.nz> <isck8i$92j$1@dont-email.me> <isee3b$sj9$1@lust.ihug.co.nz> <isnvt2615kt@news2.newsguy.com> <3KTHp.3576$PA5.1424@newsfe01.iad> <it0b3c01q2f@news2.newsguy.com> <GU8Jp.50669$5f.28538@newsfe19.iad>
NNTP-Posting-Host p1b53c2b07f0a82ea20b1773f9d29162d2e6d2776c086168f.newsdawg.com
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding 7bit
User-Agent Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.5.0
In-Reply-To <GU8Jp.50669$5f.28538@newsfe19.iad>
Xref x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:5328

Show key headers only | View raw


Arved Sandstrom wrote:
> 
> I suspect that when I did write a fair bit of C, that I wrote the client
> code in such a way that I usually needed the full declaration anyway -
> that is, no particular APIs to wrap the anticipated handling of the
> struct. You make a good point about writing the APIs in such a way that
> client code can do what it needs to do with only the pointer.

Yeah. C doesn't provide much in the way of abstraction and
encapsulation (the way that typical OO languages do), so a lot of C
programmers never notice that there are some ways to achieve a fair
bit of it.

> This is where Axis 2 C made this mistake, as I described. Their WSDL
> stub generator (and probably their skeleton generator also) produces
> code that deferences at least one very important struct pointer. The
> relevant header (and accompanying implementation) has no provision for
> supplying a suitable function that would obviate the need to dereference.

Yup, that would be a bug.

> As I see it you'd have 2 options here - (1) expose the complete struct
> in the header, and not change the client, or (2) add a function to carry
> out the operation that the client code requires, which means modifying
> both the client (the code generator actually if you're going to do this
> a lot) and the library. Either way you have to modify the library code,
> which is not something you should require of your library users.

Agreed. This might be the result of insufficient standards and editing
among the development team for Axis 2 C - it sounds like some
contributors wanted encapsulation, and others weren't thinking of it.

One of the advantages of open source is that you can fix things like
this yourself. One of the disadvantages is that you may have to...

-- 
Michael Wojcik
Micro Focus
Rhetoric & Writing, Michigan State University

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Re: Android—Why Dalvik? Michael Wojcik <mwojcik@newsguy.com> - 2011-06-03 09:31 -0400
  Re: Android—Why Dalvik? BGB <cr88192@hotmail.com> - 2011-06-03 12:45 -0700
    Re: Android—Why Dalvik? Michael Wojcik <mwojcik@newsguy.com> - 2011-06-03 17:14 -0400
  Re: Android—Why Dalvik? Lawrence D'Oliveiro <ldo@geek-central.gen.new_zealand> - 2011-06-04 12:23 +1200
    Re: Android—Why Dalvik? BGB <cr88192@hotmail.com> - 2011-06-03 19:01 -0700
      Re: Android—Why Dalvik? Michael Wojcik <mwojcik@newsguy.com> - 2011-06-07 11:59 -0400
    Re: Android—Why Dalvik? Joshua Cranmer <Pidgeot18@verizon.invalid> - 2011-06-04 02:44 -0400
      Re: Android—Why Dalvik? Lawrence D'Oliveiro <ldo@geek-central.gen.new_zealand> - 2011-06-05 11:11 +1200
        Re: Android—Why Dalvik? Michael Wojcik <mwojcik@newsguy.com> - 2011-06-08 10:10 -0400
          Re: Android—Why Dalvik? Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-06-08 20:38 -0300
            Re: Android—Why Dalvik? Joshua Cranmer <Pidgeot18@verizon.invalid> - 2011-06-08 17:28 -0700
              Re: Android—Why Dalvik? Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-06-08 23:41 -0300
            Re: Android—Why Dalvik? Michael Wojcik <mwojcik@newsguy.com> - 2011-06-11 13:38 -0400
              Re: Android—Why Dalvik? Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-06-12 16:59 -0300
                Re: Android—Why Dalvik? Michael Wojcik <mwojcik@newsguy.com> - 2011-06-15 14:01 -0400
          Re: Android—Why Dalvik? BGB <cr88192@hotmail.com> - 2011-06-08 22:46 -0700
          Re: Android---Why Dalvik? Michael Wojcik <mwojcik@newsguy.com> - 2011-06-11 13:39 -0400

csiph-web