I know we have plans to improve the offsides rules for some of these examples; I think the example of

1
2
3
someVeryLongFunctionName(arg1,
                         argn)

is a common request for feature improvement. I think in the current release you can do

1
2
3
4
someVeryLongFunctionName
    (arg1,
     argn)

but hopefully in the future F# will also allow

1
2
3
4
5
someVeryLongFunctionName(
    arg1,
    argn
)

and other reasonable forms. A lot of the same observations about the offsides rule that apply to function parameters (tuples) also apply to lists, records, and workflows.

By on 3/26/2008 9:45 PM ()

but instead I have to write

1
2
3
  async { <line 1>
          ...
          <line n> }

which means I have to indent twice as far ...

This problem also shows up with parenthesized expresssions: I have to write

1
2
3
  some_long_identifier_name.another_long_one.method_name(<arg 1>,
                                                         ...
                                                         <arg n>)

Move the opening '{' or '(' to the next line, and you can indent as little as you like:async{do ignore 0do ignore 0do ignore 0}

.

By on 3/25/2008 9:00 PM ()

That doesn't work. The following gives a syntax error:

1
2
3
4
5
 member x.context_async() =
    async
    {   let! c = impl.GetContextAsync()
        ...
    }

However, this does compile:

1
2
3
4
5
 member x.context_async() =
    async
      { let! c = impl.GetContextAsync()
        ...
      }
By on 3/26/2008 9:13 AM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper