Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
G

Grant BlahaErath

@Grant BlahaErath
About
Posts
1
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • dotNET Rant [modified]
    G Grant BlahaErath

    ahmed zahmed ranted about == not measuring underlying boxed types in: http://www.codeproject.com/Lounge.aspx?msg=3464288#xx3464288xx
    The mechanism is explained in the thread, but the more interesting question is why Hejlsberg et al. would design the language this way. Certainly, there are other languages that just bundle value and reference comparison into one operator. My first guess would be performance since it could be costly to have the compiler generate reflection checks to see if every object was an underlying boxed value type. The other thought is that comparison operators are always static (and can't polymorph). Again, that makes sense from a performance perspective as well since there would be no need to deref to a jump table for every == operation. Since there are some great scenarios for polymorphing comparison, there is the .Equals on every object. More overhead, but the choice to use the abstraction is in the hands of the coder. There are also languages that only do this (and hence stuff == into some kind of table). Anyone see any other reason than performance? Maybe 'cause Java did it? :-)

    The Lounge question csharp com learning
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups