[Vm-dev] "small" proposal for platform code in the upcoming VMs
Eliot Miranda
eliot.miranda at gmail.com
Wed Jan 19 22:10:36 UTC 2011
On Wed, Jan 19, 2011 at 12:50 PM, Igor Stasenko <siguctua at gmail.com> wrote:
>
> On 19 January 2011 21:18, Eliot Miranda <eliot.miranda at gmail.com> wrote:
> >
> > Hi All,
> > one C coding convention I think is extremely useful for finding
> definitions is to always put the name of a function (not its forward
> declaration but its definition) on a newline, so that instead of writing e.g
> > static void recordKeyboardEventCarbon(EventRef event) {
> > you write
> > static void
> > recordKeyboardEventCarbon(EventRef event) {
> > This makes it really easy to find the sole definition in text editors and
> using grep etc.
>
> grep recordKeyboardEventCarbon.*\{$
>
> will find anything that having { in the end, so it will skip the
> declarations.. (as well as definitions if curly brace are on next line
> :)
>
This gets confused by
if (myFunction(blah)) {
and doesn't work in a text editor.
>
> > If people feel they could live with this convention could I be allowed to
> make this change throughout the platform code base after code freeze and
> before the release so that this convention will be available to us all in
> the future?
>
> yeah it's a pain to find the definition using grep.. A good C/C++ IDE
> helps a lot in this regard..
>
and which should one use across Mac OS X, Win32 and Linux? A simple
cross-platform convention means not having to choose.
> unfortunately not all platforms having decent IDEs.. (Xcode is a piece
> of shit ;) ).
>
It has its place; it has its limitations, as do they all. Hence my
motivation for a really simple IDE-independent cross-platform scheme for
finding definitions.
currently i using things like this:
>
> find -type f | xargs grep fooo
>
> where foo is my search string/pattern :)
>
>
> > best
> > Eliot
> >
>
>
>
> --
> Best regards,
> Igor Stasenko AKA sig.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20110119/4f83e451/attachment.htm
More information about the Vm-dev
mailing list