SERVING THE QUANTITATIVE FINANCE COMMUNITY

 
User avatar
Cuchulainn
Posts: 62626
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

Quants : C++ vs. C#

September 30th, 2010, 2:18 pm

QuoteOriginally posted by: renormJust curious, why Java guys decided to axe unsigned integer type?Off topic. Belongs to another thread.
Last edited by Cuchulainn on September 29th, 2010, 10:00 pm, edited 1 time in total.
Step over the gap, not into it. Watch the space between platform and train.
http://www.datasimfinancial.com
http://www.datasim.nl
 
User avatar
renorm
Posts: 886
Joined: February 11th, 2010, 10:20 pm

Quants : C++ vs. C#

September 30th, 2010, 2:38 pm

OK. Let's rephrase it a bit. Why C# (unlike Java) retained unsigned types?
 
User avatar
quantmeh
Posts: 5974
Joined: April 6th, 2007, 1:39 pm

Quants : C++ vs. C#

September 30th, 2010, 2:43 pm

QuoteOriginally posted by: renormJust curious, why Java guys decided to axe unsigned integer type?you've asked for an answer, here it is interviewsQuoteGosling: For me as a language designer, which I don't really count myself as these days, what "simple" really ended up meaning was could I expect J. Random Developer to hold the spec in his head. That definition says that, for instance, Java isn't -- and in fact a lot of these languages end up with a lot of corner cases, things that nobody really understands. Quiz any C developer about unsigned, and pretty soon you discover that almost no C developers actually understand what goes on with unsigned, what unsigned arithmetic is. Things like that made C complex. The language part of Java is, I think, pretty simple. The libraries you have to look up.it's inconvenient when converting C/C++ code into Java, but otherwise I don't use unsigned ints anywhere consciously
 
User avatar
renorm
Posts: 886
Joined: February 11th, 2010, 10:20 pm

Quants : C++ vs. C#

October 1st, 2010, 12:53 am

I find Gosling's explanation strange. He knew that a lot of code would be converted from C/C++ into Java.
 
User avatar
quantmeh
Posts: 5974
Joined: April 6th, 2007, 1:39 pm

Quants : C++ vs. C#

October 1st, 2010, 1:44 am

QuoteOriginally posted by: renormI find Gosling's explanation strange. He knew that a lot of code would be converted from C/C++ into Java.he made a few strange choices. it's off-topicfor desktop GUI apps, C# is fine. i wouldn't do Web apps with it, of course.
 
User avatar
renorm
Posts: 886
Joined: February 11th, 2010, 10:20 pm

Quants : C++ vs. C#

October 1st, 2010, 4:39 am

Why not? Visual Studio has plenty of stuff for Web development. The whole thing is called .NET for a reason.
 
User avatar
GiusCo
Posts: 124
Joined: March 26th, 2010, 10:00 pm

Quants : C++ vs. C#

October 1st, 2010, 4:34 pm

My background is science, I used numerical analysis for several problems (evacuation networks, wind turbines, particle physics, fracture mechanics, pollutants dispersion). Being in my late 30s I still consider Fortran my best friend for number crunching. The internet revolution has given access to a large pool of resources, libraries and packages, so that I do not need starting from scratch anymore. Simply put the pieces together and compute. The tools are astonishing today, I'm quite ashamed: it is just having thousand and thousand of man-hours work at your feet for free or for peanuts. Still I love my Fortran routines. I like matlab because it is a sort of dashboard and I like C++ because it is a good compromise between high and low level programming in my science/engineering applications.Quant finance? Dunno yet, I'm relatively new here and my hook is energy, from quantitative analysis/research to commodities and derivatives. My gut instict suggests sticking to C++ not only for a prospective job (I may even never work in this field) but also as an intellectual opportunity not to put me into a "slang". Hard work is heavily outsourced to India and China today but these people need very detailed specifications because they generally lack autonomy and initiative, maybe for cultural reasons.So my two cents here go to the "forma mentis" you need to develop to be really proficient with C++, that is something you may very well recycle and reuse 10-20-30 years from now, new and more specialized languages coming.
 
User avatar
quantmeh
Posts: 5974
Joined: April 6th, 2007, 1:39 pm

Quants : C++ vs. C#

October 1st, 2010, 4:59 pm

QuoteOriginally posted by: renormWhy not? Visual Studio has plenty of stuff for Web development. The whole thing is called .NET for a reason.for what reason, exactly?most Web servers are non-Windows. Windows is a horrible platform for Web or any servers, for that matter. today most interesting Web development is on Linux or Unix. I doubt it's your domain though
 
User avatar
renorm
Posts: 886
Joined: February 11th, 2010, 10:20 pm

Quants : C++ vs. C#

October 2nd, 2010, 4:31 am

Yeh, hopefully I will never have to do Web development. I was refereeing to the client side of the business.
 
User avatar
renorm
Posts: 886
Joined: February 11th, 2010, 10:20 pm

Quants : C++ vs. C#

October 2nd, 2010, 5:00 am

GiusCo,I did learn both C++ and Java, but stopped using Java after figuring out that it is easier to write multi-core code in C++ than in Java. No, I am not hallucinating. I know it from my own real experience.C++ isn't more low level than Java. C++ has low level stuff as a bonus. You don't have to use low stuff in your C++ programs. Without low level stuff C++ is unsafe type of arguments become less convincing. It is true that C++ syntax is somewhat more complicated. There are few minefields which every C++ programmers must be aware of. But at the same time, C++ is more expressive and allows finer control over program's execution.
 
User avatar
Cuchulainn
Posts: 62626
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

Quants : C++ vs. C#

October 2nd, 2010, 7:42 am

QuoteI still consider Fortran my best friend for number crunching. Indeed! But Fortran was created specifically for maths. C++ and Java are all-rounders. Even now, writing a package for say FEM is more suitable in Fortran than C++, particularly if we have EBNF front-ends.It's like comparing 100 m sprinters and those who do the pentathlon.Modular programming in C++ a la Fortran is good practice imo. QuoteFortran routinesThey have a certain elegance; loose external coupling and strong internal cohesion. Can plug into code wihout having to pull in the whole kitchen sink.
Last edited by Cuchulainn on October 1st, 2010, 10:00 pm, edited 1 time in total.
Step over the gap, not into it. Watch the space between platform and train.
http://www.datasimfinancial.com
http://www.datasim.nl
 
User avatar
quantmeh
Posts: 5974
Joined: April 6th, 2007, 1:39 pm

Quants : C++ vs. C#

October 2nd, 2010, 11:09 am

QuoteOriginally posted by: renormYeh, hopefully I will never have to do Web development. I was refereeing to the client side of the business.client side is also changing. it used to be 95% Windows. today it's all sorts of things from iPhone and Kindle to Macs and Vista. do you really want to deal with every system? I doubt it. let the browser do its thing, then it's very little left for things like C++
 
User avatar
renorm
Posts: 886
Joined: February 11th, 2010, 10:20 pm

Quants : C++ vs. C#

October 2nd, 2010, 12:44 pm

What does let the browser do its thing exactly means?
 
User avatar
Traden4Alpha
Posts: 23951
Joined: September 20th, 2002, 8:30 pm

Quants : C++ vs. C#

October 2nd, 2010, 1:10 pm

QuoteOriginally posted by: renormWhat does let the browser do its thing exactly means?I think he means that we can decouple the server-side and client-side systems by creating an interface based on web protocols (HTML, Javascript, Ruby on Rails, etc.). The server can do it's magic using whatever language and toolbox the programmer wants as long as it can handle I/O through a web interface. The device or browser maker handles the peculiarities of the device (e.g., PC vs. smartphone) so the server-side programmer can ignore those issues.** the only sticky issue is the huge difference between mouse-based vs. touch-based UIs. A touch interface cannot distinguish between mouseover and mousedown/mousedrag (and has issues with fingers obscuring the touched area). It's one of the reasons Apple hates Flash for iPhone/iPad and one of the reasons that the new windows phone 7 will probably suck.
 
User avatar
quantmeh
Posts: 5974
Joined: April 6th, 2007, 1:39 pm

Quants : C++ vs. C#

October 2nd, 2010, 1:32 pm

QuoteOriginally posted by: Traden4AlphaQuoteOriginally posted by: renormWhat does let the browser do its thing exactly means?I think he means that we can decouple the server-side and client-side systems by creating an interface based on web protocols (HTML, Javascript, Ruby on Rails, etc.). The server can do it's magic using whatever language and toolbox the programmer wants as long as it can handle I/O through a web interface. The device or browser maker handles the peculiarities of the device (e.g., PC vs. smartphone) so the server-side programmer can ignore those issues.*yes, that's what i meant. i understand that not all apps can be done in a browser. then you have to deal with different platforms, and it's not fun.Cocoa development is very different from VS.NET. you can find 'common denominator' in C/C++ and native coding. sometimes you have to. but what's common in this denominator apart from language syntax? they use C to exploit hardware peculiarities, and this code is VERY different from device to device. in Apple's walled garden there's much smaller variety of hardware, you can survive.i know people who write C/asm code for iPhone because it's faster. most people don't do this though. you can very well find your domain to be at one of those unlucky exceptions.
ABOUT WILMOTT

PW by JB

Wilmott.com has been "Serving the Quantitative Finance Community" since 2001. Continued...


Twitter LinkedIn Instagram

JOBS BOARD

JOBS BOARD

Looking for a quant job, risk, algo trading,...? Browse jobs here...


GZIP: On