I am looking to buy a 2.8 lens, I heard that Sony's lens is more closer to the sensor. Is that true ?
Why I am asking this because, I heard (not sure) that
one advantage of mirrorless camera's are having lens close to the sensor
Photography Stack Exchange is a question and answer site for professional, enthusiast and amateur photographers. It only takes a minute to sign up.Sign up to join this community
The "closer to the sensor" advantage of which your friend speaks has a lot more to do with the distance between the sensor and the flange upon which the lens is attached, referred to as the registration distance (or colloquially as the flange-focal-distance) for a particular lens mount system, than it has to do with the different distances to the sensor the rear lens elements for one lens or another made for the same lens mount in the same focal length range may have.
In your case that advantage is in the Sony E-mount's 18mm registration distance when compared to SLR systems such as Sony's A-mount, Canon's EF mount, or Nikon's F-mount that have registration distances of 44.5mm, 44mm, and 46.5mm, respectively.
The advantage of shorter registration distances, allowed by the lack of a mirror between the lens flange and the sensor/film plane, is that wider angle lenses aren't required to be more complex retrofocal designs when the desired focal length is longer than the distance from the sensor to the lens mounting flange. Even when the desired focal length is shorter than the registration distance and a retrofocus design must be used, such a lens has to be less retrofocus than a lens with same desired focal length for a mount system with a longer registration distance.
A retrofocus design is essentially a telephoto lens in reverse with additional elements at the rear of the lens. If I want to make a 12mm lens for a system that has an 18mm registration distance it doesn't have to be as strong of a retrofocus design as a 12mm lens designed for a system with a 46.5mm registration distance. Just as longer focal length telephoto designs get increasingly larger and more expensive, shorter focal length retrofocus designs get increasingly larger and more expensive the shorter they are relative to the registration distance for which they are designed.
If we want to design a 24mm lens for a system with a 44mm registration distance and we can't allow the lens elements to be "countersunk" into the camera body because there's a mirror in the way, then we have to use a retrofocus design.
If we want to design a 24mm lens for a system with an 18mm registration distance we don't need to be concerned with that because we can fit the lens in front of the camera's mounting flange without needing to resort to a more complex and expensive retrofocus design.
First, consider a simple one element lens, like a magnifying glass. The distance from the lens to the "sensor" is the focal length. A long focal length will be more distant from the sensor. (this is the "thin lens" formula).
However, such a simple lens has aberrations, optical faults (primarily, a single element cannot focus all colors into the same spot). It would be poor lens for photography. So additional corrective elements are added. This thickness results in two focus nodes, one node seeing the scene, and one "seeing" the sensor (and even more elements added to transfer the image between the nodes).
The nodes are typically inside the lens body, but math can place those two nodes anywhere. Telephoto means the sensor node is in front of the lens, so that the lens is shorter than its focal length (to be compact, easy to carry and use). Telephoto does not mean distant, wide angle lenses also focus at infinity.
Retrofocus lenses (more extreme wide angle short lenses) puts the sensor node well behind the lens, which allows room for the mirror of a SLR to rise behind the lens.
Mirrorless cameras have no need for that extra spacing, so the advantage is simply a thinner camera body. It is NOT an optical advantage.