|
I've been doing this for almost 30 years as well. All of it with the same company, if you disregard the 2 times my company was bought by competitors in the last 12 years.
I still enjoy what I do, more or less. After the last acquisition a couple years ago they closed the office where I worked so now I get to work from home, pretty much doing what I have been doing for almost 30 years.
In some ways I am stuck in my career but in reality it is winding down any way. I have golden handcuffs. I can't expect to go somewhere else at my age and enjoy the same pay and benefits I currently have.
That being said, if I win the $600M+ Mega Millions tonight I will not quit. I will however become very difficult to manage!
|
|
|
|
|
txmrm wrote: if I win the $600M+ Mega Millions tonight I will not quit. I will however become very difficult to manage!
/ravi
|
|
|
|
|
Well I'm a tart so it would take 2 sh*t pots of money to get me to move! While the environment I work in is bloody horrible it is a big sh*t pot!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
...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
|
|
|
|
|
|
Maximilien wrote: In C++11, there is the notion of user defined literals.
Wow, that was a fascinating read - thanks for the link. It's been many years since I looked at C++!
Marc
|
|
|
|
|
Well, you can do things analagous to this in Smalltalk.
|
|
|
|
|
Pete O'Hanlon wrote: Well, you can do things analagous to this in Smalltalk.
Funny you mention that, I was looking at smalltalk a couple minutes ago!
Marc
|
|
|
|
|
Great minds and all of that.
|
|
|
|
|
I hate myself for typing this:
namespace TestApp1
{
using AgeInYears = System.Int32;
class Program
{
static void Main(string[] args)
{
AgeInYears myAge = 10;
AgeInYears oldAge = 50;
AgeInYears timeUntilOldAge = oldAge - myAge;
}
}
}
Yes, that's perfectly legal C# code. Its technically an int, works the same way that #define does in c++ to replace types. It only works in single code files though.
|
|
|
|
|
Ron Beyer wrote: AgeInYears oldAge = 50; You know that you're offending quite a lot of the CP users here, don't you?
Anything that is unrelated to elephants is irrelephant Anonymous ----- The problem with quotes on the internet is that you can never tell if they're genuine Winston Churchill, 1944 ----- I'd just like a chance to prove that money can't make me happy. Me, all the time
|
|
|
|
|
I'm creeping up there myself, so old age certainly isn't far off for me.
|
|
|
|
|
Well, if only you don't add this:
if (myAge >= oldAge)
thisGuyIsDead = true;
or
if (myAge >= oldAge)
BookSpaceInRetirementHome(this);
Anything that is unrelated to elephants is irrelephant Anonymous ----- The problem with quotes on the internet is that you can never tell if they're genuine Winston Churchill, 1944 ----- I'd just like a chance to prove that money can't make me happy. Me, all the time
|
|
|
|
|
Ron Beyer wrote: Yes, that's perfectly legal C# code.
Fascinating. I'm glad there are some things of which I'm still ignorant.
Marc
|
|
|
|
|
I wouldn't get too excited about it though, its really one of the more horrible C# "features". Try the little program out once, then type out a function that has int's as parameters, Intellisense replaces any occurrence of the type with AgeInYears. And while you can define more than one alias for the same type, Intellisense will pick the last defined one to replace in the preview window.
Its also a really good way of making code impossible to follow.
|
|
|
|
|
Ron Beyer wrote: Its also a really good way of making code impossible to follow.
No worse than using "var" implicit types, I suspect.
Marc
|
|
|
|
|
var has its place. Too many programmers let it escape that place, unfortunately.
Software Zen: delete this;
|
|
|
|
|
Cue "who let the dogs out" playing for an unreasonably long time in my head...
|
|
|
|
|
Software Zen: delete this;
|
|
|
|
|
That's a problem with Intellisense then, not the language.
Defining aliases is the one best use for the using directive, but I limit it to complex types like Dictionary-of-Dictionary-of-List kinds of things.
Or, you can make a more general alias for a particular type, like using Connection=System.Data.SqlClient.SqlConnection .
|
|
|
|
|
Hi Ron, fyi: Visual Studio 2013 IntelliSense does not suggest, or replace, an int Type with an alias defined in a Using statement.
If you seek to aid everyone that suffers in the galaxy, you will only weaken yourself … and weaken them. It is the internal struggles, when fought and won on their own, that yield the strongest rewards… If you care for others, then dispense with pity and sacrifice and recognize the value in letting them fight their own battles." Darth Traya
|
|
|
|
|
Odd, mine does, VS2013 is what I tried that in. When I typed String.Compare( then hit the down arrow to select one of the overloads that had an int, it showed AgeInYears instead of int.
|
|
|
|
|
Interesting; a little investigation shows that a ReSharper trial version (Build 8.1.23.546) is what is making the difference in what shows up in the Intellisense pop-up, where ints are expected.
bill
If you seek to aid everyone that suffers in the galaxy, you will only weaken yourself … and weaken them. It is the internal struggles, when fought and won on their own, that yield the strongest rewards… If you care for others, then dispense with pity and sacrifice and recognize the value in letting them fight their own battles." Darth Traya
|
|
|
|
|
Upvoted ! Before I read your response, I had opened VS 2013, and typed:
using AgeInYears = System.Int32;
Any time my mind works like yours, I feel better
bill
If you seek to aid everyone that suffers in the galaxy, you will only weaken yourself … and weaken them. It is the internal struggles, when fought and won on their own, that yield the strongest rewards… If you care for others, then dispense with pity and sacrifice and recognize the value in letting them fight their own battles." Darth Traya
|
|
|
|
|
If you only knew how my mind worked
|
|
|
|