value class convention

Dan Howard sproket at
Mon Dec 22 20:00:12 UTC 2014

Question what does the following C# code output:

class  Program
         static  void  Main(string[] args)
             Account  account =new  Account();
             account.AcccountNumber ="1234";
             account.Name ="Savings";
             account.Balance = 10;
             Console.WriteLine("BEFORE: "  + account);
             adjustAccountBalance(account, 10);
             Console.WriteLine("AFTER: "  + account);
         static  void  adjustAccountBalance(Account  account,float  balance)
             account.Balance += balance;

Answer: *unknown.* Since we don't know if an Account is a *class *or a 

One way would could help avoid this situation in Java would be to use 
lower case/underscore convention for value types - to give same 
indication as primitives.

Here we'd have:

account  account =new  account();


point  p =new  point();


What do you think?

This email has been checked for viruses by Avast antivirus software.

More information about the valhalla-dev mailing list