This page is no longer maintained — Please continue to the home page at www.scala-lang.org

Re: Re: Re: Re: forbidding “dangling” local blocks in scala

5 replies
Naftoli Gugenheim
Joined: 2008-12-17,
User offline. Last seen 42 years 45 weeks ago.

+1 for locally, if it's so necessary. Maybe it's worthwhile to add it to Predef without deprecating standalone blocks, so one can use whatever style he prefers? Although I myself would probably use it.

-------------------------------------
Kris Nuttycombe wrote:

On Wed, Oct 7, 2009 at 7:56 AM, Seth Tisue wrote:
>>>>>> "martin" == martin odersky writes:
>
>  martin> Then we'd deprecate local blocks in class and object templates,
>  martin> and we'd require instead to write
>
>  martin>   initialize { ... }
>
>  martin> This would work, except that I am not 100% sure yet whether
>  martin> initialize is the best name. Are there other suggestions?
>
> locally

+1

Ricky Clarkson
Joined: 2008-12-19,
User offline. Last seen 3 years 2 weeks ago.
Re: Re: Re: [scala-deb ate] Re: forbidding “dangling†loca

Your Peek is broken.

The subject of the email you sent is:

Re: [scala-debate] Re: [scala-debate] Re: [scala-debate] Re:
[scala-debate] forbidding “dangling†local blocks in scala

I will order a wider monitor ready for your next email. :)

2009/10/7 Naftoli Gugenheim :
> +1 for locally, if it's so necessary. Maybe it's worthwhile to add it to Predef without deprecating standalone blocks, so one can use whatever style he prefers? Although I myself would probably use it.
>
>
> -------------------------------------
> Kris Nuttycombe wrote:
>
> On Wed, Oct 7, 2009 at 7:56 AM, Seth Tisue wrote:
>>>>>>> "martin" == martin odersky writes:
>>
>>  martin> Then we'd deprecate local blocks in class and object templates,
>>  martin> and we'd require instead to write
>>
>>  martin>   initialize { ... }
>>
>>  martin> This would work, except that I am not 100% sure yet whether
>>  martin> initialize is the best name. Are there other suggestions?
>>
>> locally
>
> +1
>

anli
Joined: 2008-08-19,
User offline. Last seen 1 day 48 min ago.
Re: forbidding “dangling” local blocks in scala

On Wednesday 07 October 2009 20:03:46 Naftoli Gugenheim wrote:
> +1 for locally, if it's so necessary. Maybe it's worthwhile to add it to
> Predef without deprecating standalone blocks, so one can use whatever
> style he prefers?

For my eyes any additional degree of freedom results in more confusion. At
this POV deprecating is a good thing...

> Although I myself would probably use it.

... especially as far as nobody still rejected this Martin's suggestion in
common ;-)

+1 for 'locally'.

Kevin Wright
Joined: 2009-06-09,
User offline. Last seen 49 weeks 3 days ago.
Re: forbidding “dangling” local b locks in scala
dcsobral
Joined: 2009-04-23,
User offline. Last seen 38 weeks 5 days ago.
Re: Re: forbidding “ dangling” local blocks in scala
Well... since the point is to run a side-effectful block of code returning Unit, I don't see that as a match. If you want to use the result of the block for something, then it is not dangling, and there's no problem.
On Wed, Oct 7, 2009 at 5:47 PM, Kevin Wright <kev [dot] lee [dot] wright [at] googlemail [dot] com> wrote:
how about resultof, or resultOf?


On Wed, Oct 7, 2009 at 9:29 PM, Andrew Gaydenko <a [at] gaydenko [dot] com> wrote:
> On Wednesday 07 October 2009 20:03:46 Naftoli Gugenheim wrote:
>> +1 for locally, if it's so necessary. Maybe it's worthwhile to add it to
>>  Predef without deprecating standalone blocks, so one can use whatever
>>  style he prefers?
>
> For my eyes any additional degree of freedom results in more confusion. At
> this POV deprecating is a good thing...
>
>>  Although I myself would probably use it.
>
> ... especially as far as nobody still rejected this Martin's suggestion in
> common ;-)
>
> +1 for 'locally'.
>



--
Daniel C. Sobral

Something I learned in academia: there are three kinds of academic reviews: review by name, review by reference and review by value.
Kevin Wright
Joined: 2009-06-09,
User offline. Last seen 49 weeks 3 days ago.
Re: Re: forbidding “ dangling” local blocks in scala

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland