Click here to Skip to main content
15,913,722 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: So how did you get stuck in your career, anyway? Pin
Gary Wheeler17-Dec-13 6:47
Gary Wheeler17-Dec-13 6:47 
GeneralRe: So how did you get stuck in your career, anyway? Pin
devenv.exe17-Dec-13 7:30
professionaldevenv.exe17-Dec-13 7:30 
GeneralRe: So how did you get stuck in your career, anyway? Pin
Roger Wright17-Dec-13 8:42
professionalRoger Wright17-Dec-13 8:42 
GeneralRe: So how did you get stuck in your career, anyway? Pin
Ravi Bhavnani17-Dec-13 8:56
professionalRavi Bhavnani17-Dec-13 8:56 
GeneralRe: So how did you get stuck in your career, anyway? Pin
txmrm17-Dec-13 10:40
txmrm17-Dec-13 10:40 
GeneralRe: So how did you get stuck in your career, anyway? Pin
Ravi Bhavnani17-Dec-13 10:43
professionalRavi Bhavnani17-Dec-13 10:43 
GeneralRe: So how did you get stuck in your career, anyway? Pin
Mycroft Holmes17-Dec-13 13:22
professionalMycroft Holmes17-Dec-13 13:22 
GeneralIs there a programming language... PinPopular
Marc Clifton17-Dec-13 4:28
mvaMarc Clifton17-Dec-13 4:28 
...that works "easily" with semantic types? For example, I may have:

int age = 51;

which completely loses the concept that 51 is an age (in years). What I want is something like:

AgeInYears myAge = 51;

and yet still be able to specify that I can perform, say, arithmetic operations on "myAge". For example, in C#, I could write:

class AgeInYears
{
  public int Value {get;set;}
}

... implement operators on AgeInYears


But that gets messy real fast - every "semantic type" needs these operators, etc.

Furthermore, the unit of measurement is still not handled very elegantly.

So, as the question states, are there programming languages out there that are more expressive of semantic types?

Marc

GeneralRe: Is there a programming language... Pin
Maximilien17-Dec-13 4:37
Maximilien17-Dec-13 4:37 
GeneralRe: Is there a programming language... Pin
Marc Clifton17-Dec-13 5:02
mvaMarc Clifton17-Dec-13 5:02 
GeneralRe: Is there a programming language... Pin
Pete O'Hanlon17-Dec-13 4:37
mvePete O'Hanlon17-Dec-13 4:37 
GeneralRe: Is there a programming language... Pin
Marc Clifton17-Dec-13 4:40
mvaMarc Clifton17-Dec-13 4:40 
GeneralRe: Is there a programming language... Pin
Pete O'Hanlon17-Dec-13 4:50
mvePete O'Hanlon17-Dec-13 4:50 
GeneralRe: Is there a programming language... Pin
Ron Beyer17-Dec-13 4:37
professionalRon Beyer17-Dec-13 4:37 
GeneralRe: Is there a programming language... Pin
Johnny J.17-Dec-13 4:41
professionalJohnny J.17-Dec-13 4:41 
JokeRe: Is there a programming language... Pin
Ron Beyer17-Dec-13 4:43
professionalRon Beyer17-Dec-13 4:43 
GeneralRe: Is there a programming language... Pin
Johnny J.17-Dec-13 4:49
professionalJohnny J.17-Dec-13 4:49 
GeneralRe: Is there a programming language... Pin
Marc Clifton17-Dec-13 4:41
mvaMarc Clifton17-Dec-13 4:41 
GeneralRe: Is there a programming language... Pin
Ron Beyer17-Dec-13 4:49
professionalRon Beyer17-Dec-13 4:49 
GeneralRe: Is there a programming language... Pin
Marc Clifton17-Dec-13 5:09
mvaMarc Clifton17-Dec-13 5:09 
GeneralRe: Is there a programming language... Pin
Gary Wheeler17-Dec-13 6:55
Gary Wheeler17-Dec-13 6:55 
GeneralRe: Is there a programming language... Pin
SortaCore17-Dec-13 22:08
SortaCore17-Dec-13 22:08 
GeneralRe: Is there a programming language... Pin
Gary Wheeler18-Dec-13 0:36
Gary Wheeler18-Dec-13 0:36 
GeneralRe: Is there a programming language... Pin
PIEBALDconsult17-Dec-13 5:39
mvePIEBALDconsult17-Dec-13 5:39 
GeneralRe: Is there a programming language... Pin
BillWoodruff17-Dec-13 10:43
professionalBillWoodruff17-Dec-13 10:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.