Consider the following declarations, all of which look very similar.
```fsharp
moduleM=
letz=1
letf=x+z
typeC(w:int,z:int)=
letfx=x+z
letfx=f3+x
letg(z:int)=
letfx=x+1
```
Part of the job of the F# compiler is to "decide" how these declarations are compiled. The following acts as a guide to how these different bindings are represented and where these decisions are made.
First for module-level `let` bindings. These representations are decided by code in `CheckExpressions.fs` and `CheckDeclarations.fs` based on syntax.
```fsharp
moduleM=
letz=1// z --> static property + field, required by spec, compiled name mandated
letfx=x+z// f --> static method, required by spec, compiled name mandated
```
Next for class-level `let` bindings. These representations are decided by code in `CheckIncrementalClasses.fs` based on analysis of use.
```fsharp
// Decided in CheckIncrementalClasses.fs based on analysis of use
typeC(w:int,z:int)=// w --> local to object constructor, required by spec
// z --> private instance field, required by spec
letfx=x+z// f --> private instance method, required by spec, compiled name not mandated
// Note: initially uses an ephemeral 'f' Val then creates a member Val with compiled name
letfx=f3+x// f --> private instance method, required by spec, compiled name not mandated
// Note: initially uses an ephemeral 'f' Val then creates a member Val with compiled name
staticletgx=x+1// g --> private static method, required by spec, compiled name not mandated, initially uses an ephemeral 'g' Val then creates a member Val with compiled name
staticletgx=g3// g --> private static method, required by spec, compiled name not mandated, initially uses an ephemeral 'g' Val then creates a member Val with compiled name
```
Next for expression-level `let` bindings. These representations are decided by code in various optimization phases.
```fsharp
letg(z:int)=// z --> local + field in closure for 'f', not mandated
letfx=x+1// f --> FSharpFunc value, or maybe a static method, not mandated
// Decided in various optimization phases
```
> NOTE: The representation decision is implied by the addition of ValReprInfo to the `Val` node.