The Trunk: Kernel-eem.1062.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Kernel-eem.1062.mcz

commits-2
Eliot Miranda uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-eem.1062.mcz

==================== Summary ====================

Name: Kernel-eem.1062
Author: eem
Time: 9 March 2017, 12:34:12.792744 pm
UUID: 6376b349-df2b-4eab-8e2c-8695002a1bcb
Ancestors: Kernel-jr.1061

Eliminate obsolete millisecond delay primitive.

=============== Diff against Kernel-jr.1061 ===============

Item was removed:
- ----- Method: Delay class>>primSignal:atMilliseconds: (in category 'primitives') -----
- primSignal: aSemaphore atMilliseconds: aSmallInteger
- "Signal the semaphore when the millisecond clock reaches the value of the second argument. Fail if the first argument is neither a Semaphore nor nil. Essential. See Object documentation whatIsAPrimitive."
- <primitive: 136>
- ^self primitiveFailed!

Item was changed:
  ----- Method: Delay class>>shutDown (in category 'snapshotting') -----
  shutDown
  "Suspend the active delay, if any, before snapshotting. It will be reactived when the snapshot is resumed."
  "Details: This prevents a timer interrupt from waking up the active delay in the midst snapshoting, since the active delay will be restarted when resuming the snapshot and we don't want to process the delay twice."
 
  AccessProtect wait.
+ self primSignal: nil atUTCMicroseconds: 0.
- self primSignal: nil atMilliseconds: 0.
  self saveResumptionTimes.
+ DelaySuspended := true!
- DelaySuspended := true.!


Reply | Threaded
Open this post in threaded view
|

OT: Re: The Trunk: Kernel-eem.1062.mcz

Tobias Pape
Hi,


> On 09.03.2017, at 21:34, [hidden email] wrote:
>
> + DelaySuspended := true!
> - DelaySuspended := true.!

This is OT and I'm just curious, but why did you remove the period?

Best regards
        -Tobias

Reply | Threaded
Open this post in threaded view
|

Re: OT: Re: The Trunk: Kernel-eem.1062.mcz

Eliot Miranda-2
Hi Tobias,

On Thu, Mar 9, 2017 at 12:39 PM, Tobias Pape <[hidden email]> wrote:
Hi,


> On 09.03.2017, at 21:34, [hidden email] wrote:
>
> +     DelaySuspended := true!
> -     DelaySuspended := true.!

This is OT and I'm just curious, but why did you remove the period?

In Smalltalk period is a statement separator.  In C semicolon is a statement terminator.  So in Smalltalk the period is unnecessary (and I find irritating) at the end of a method, wheres in C the semicolon and the end of a return statement, for example, is required.  I like to see code as clean as possible.  If I see some extraneous thing I find it distracting.  Another irritation for me is whitespace at the end of a method, which I think appears unnoticed due to bugs in some tools.  I even find myself irritated by the whitespace that turns up at the end of a method signature when there are keyword arguments (which arises from a natural way of writing the keyword:/argument printing code).    Rather OCD of me, but there it is.
 
Best regards
        -Tobias

_,,,^..^,,,_
best, Eliot


Reply | Threaded
Open this post in threaded view
|

Re: OT: Re: The Trunk: Kernel-eem.1062.mcz

Tobias Pape

> On 10.03.2017, at 20:55, Eliot Miranda <[hidden email]> wrote:
>
> Hi Tobias,
>
> On Thu, Mar 9, 2017 at 12:39 PM, Tobias Pape <[hidden email]> wrote:
> Hi,
>
>
> > On 09.03.2017, at 21:34, [hidden email] wrote:
> >
> > +     DelaySuspended := true!
> > -     DelaySuspended := true.!
>
> This is OT and I'm just curious, but why did you remove the period?
>
> In Smalltalk period is a statement separator.  In C semicolon is a statement terminator.

Yes. And the last statement in a Smalltalk method always is a return. Either explicit (^ bla) or implicit return self.
Thats why I asked. For me

blorp

        self foo.
        ^ self knorz

is consistent with

foo

        self bar.
        self baz.

because it is equivalent to

foo

        self bar.
        self baz.
        ^ self


But, yes, that's OT.

Question is whether we change the style of existing methods to our own given that we do not have community consensus here…

Best regards
        -Tobias


>  So in Smalltalk the period is unnecessary (and I find irritating) at the end of a method, wheres in C the semicolon and the end of a return statement, for example, is required.  I like to see code as clean as possible.  If I see some extraneous thing I find it distracting.  Another irritation for me is whitespace at the end of a method, which I think appears unnoticed due to bugs in some tools.  I even find myself irritated by the whitespace that turns up at the end of a method signature when there are keyword arguments (which arises from a natural way of writing the keyword:/argument printing code).    Rather OCD of me, but there it is.
>  
> Best regards
>         -Tobias
>
> _,,,^..^,,,_
> best, Eliot
>


Reply | Threaded
Open this post in threaded view
|

Re: OT: Re: The Trunk: Kernel-eem.1062.mcz

David T. Lewis
On Fri, Mar 10, 2017 at 09:39:29PM +0100, Tobias Pape wrote:

>
> > On 10.03.2017, at 20:55, Eliot Miranda <[hidden email]> wrote:
> >
> > Hi Tobias,
> >
> > On Thu, Mar 9, 2017 at 12:39 PM, Tobias Pape <[hidden email]> wrote:
> > Hi,
> >
> >
> > > On 09.03.2017, at 21:34, [hidden email] wrote:
> > >
> > > +     DelaySuspended := true!
> > > -     DelaySuspended := true.!
> >
> > This is OT and I'm just curious, but why did you remove the period?
> >
> > In Smalltalk period is a statement separator.  In C semicolon is a statement terminator.
>
> Yes. And the last statement in a Smalltalk method always is a return. Either explicit (^ bla) or implicit return self.
> Thats why I asked. For me
>
> blorp
>
> self foo.
> ^ self knorz
>
> is consistent with
>
> foo
>
> self bar.
> self baz.
>
> because it is equivalent to
>
> foo
>
> self bar.
> self baz.
> ^ self

To my eye, it makes no big difference either way. But for what it's worth
I think that the rationale for using an extra period is that it makes diffs
easier to read when someone later adds something to the end of the method.

Dave


>
>
> But, yes, that's OT.
>
> Question is whether we change the style of existing methods to our own given that we do not have community consensus here???
>
> Best regards
> -Tobias
>
>
> >  So in Smalltalk the period is unnecessary (and I find irritating) at the end of a method, wheres in C the semicolon and the end of a return statement, for example, is required.  I like to see code as clean as possible.  If I see some extraneous thing I find it distracting.  Another irritation for me is whitespace at the end of a method, which I think appears unnoticed due to bugs in some tools.  I even find myself irritated by the whitespace that turns up at the end of a method signature when there are keyword arguments (which arises from a natural way of writing the keyword:/argument printing code).    Rather OCD of me, but there it is.
> >  
> > Best regards
> >         -Tobias
> >
> > _,,,^..^,,,_
> > best, Eliot
> >
>
>