Click here to Skip to main content
15,896,063 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: Thought of the day Pin
Ravi Bhavnani20-Oct-15 7:14
professionalRavi Bhavnani20-Oct-15 7:14 
GeneralRe: Thought of the day Pin
jeron120-Oct-15 7:20
jeron120-Oct-15 7:20 
GeneralRe: Thought of the day Pin
Ravi Bhavnani20-Oct-15 9:00
professionalRavi Bhavnani20-Oct-15 9:00 
GeneralRe: Thought of the day Pin
Bootking20-Oct-15 8:44
Bootking20-Oct-15 8:44 
GeneralRe: Thought of the day Pin
Chris Maunder20-Oct-15 22:03
cofounderChris Maunder20-Oct-15 22:03 
GeneralRe: Thought of the day Pin
Gary Wheeler21-Oct-15 2:43
Gary Wheeler21-Oct-15 2:43 
GeneralRe: Thought of the day Pin
OriginalGriff21-Oct-15 4:57
mveOriginalGriff21-Oct-15 4:57 
GeneralBridge.NET - write "C#", run the wrong JavaScript. Pin
harold aptroot20-Oct-15 3:57
harold aptroot20-Oct-15 3:57 
Nice try there, Bridge. Unfortunately, math is broken. This is common for all those converters to JavaScript (except Emscripten of course, which actually works). Could we all stop doing this, please? It's not that hard to get it right.

Bridge.NET right now:
C#
int a = int.MaxValue;
int b = a + a;
Global.Alert(b);
JavaScript
var a = 2147483647;
var b = a + a;
Bridge.global.alert(b);
http://live.bridge.net/#4c6aca236466b524c45e[^]

No Bridge, an int cannot be 4294967294. The only correct result is -2, because the only correct result is "whatever C# does".

Suggested code: come on guys, this is trivial to generate.
JavaScript
var a = 2147483647;
var b = a + a | 0;
Bridge.global.alert(b);
long doesn't even begin to work. I admit that would be a bit trickier, but tough sh*t, the job of a compiler is to get the semantics right, even if it isn't trivial. I'm disappointed, and frankly, annoyed. "But GWT does it too!" - yes and they were wrong to do it. Bridge seems to be yet an other syntax converter that doesn't actually care about semantics. And what's the point of that? If I have to write "JavaScript, but in C#" then why would I even do it? I don't get to use existing C# code because it wouldn't bloody work, the only thing I get is slightly different syntax. It doesn't even do type checking.

modified 20-Oct-15 10:08am.

GeneralRe: Bridge.NET - write "C#", run the wrong JavaScript. Pin
BillWoodruff20-Oct-15 4:13
professionalBillWoodruff20-Oct-15 4:13 
GeneralRe: Bridge.NET - write "C#", run the wrong JavaScript. Pin
harold aptroot20-Oct-15 4:30
harold aptroot20-Oct-15 4:30 
GeneralRe: Bridge.NET - write "C#", run the wrong JavaScript. Pin
Pete O'Hanlon20-Oct-15 4:38
mvePete O'Hanlon20-Oct-15 4:38 
GeneralRe: Bridge.NET - write "C#", run the wrong JavaScript. Pin
harold aptroot20-Oct-15 4:40
harold aptroot20-Oct-15 4:40 
GeneralRe: Bridge.NET - write "C#", run the wrong JavaScript. Pin
Pete O'Hanlon20-Oct-15 4:45
mvePete O'Hanlon20-Oct-15 4:45 
GeneralRe: Bridge.NET - write "C#", run the wrong JavaScript. Pin
Marc Clifton20-Oct-15 10:54
mvaMarc Clifton20-Oct-15 10:54 
GeneralRe: Bridge.NET - write "C#", run the wrong JavaScript. Pin
Gary Wheeler21-Oct-15 2:45
Gary Wheeler21-Oct-15 2:45 
GeneralWhy IT sucks today Pin
Dan Neely20-Oct-15 3:03
Dan Neely20-Oct-15 3:03 
GeneralRe: Why IT sucks today Pin
den2k8820-Oct-15 3:28
professionalden2k8820-Oct-15 3:28 
GeneralRe: Why IT sucks today PinPopular
Dan Neely20-Oct-15 3:53
Dan Neely20-Oct-15 3:53 
GeneralRe: Why IT sucks today Pin
den2k8820-Oct-15 4:42
professionalden2k8820-Oct-15 4:42 
GeneralRe: Why IT sucks today Pin
kmoorevs20-Oct-15 7:22
kmoorevs20-Oct-15 7:22 
GeneralRe: Why IT sucks today Pin
den2k8820-Oct-15 9:22
professionalden2k8820-Oct-15 9:22 
GeneralRe: Why IT sucks today Pin
Dan Neely20-Oct-15 9:52
Dan Neely20-Oct-15 9:52 
GeneralRe: Why IT sucks today Pin
den2k8820-Oct-15 10:31
professionalden2k8820-Oct-15 10:31 
GeneralRe: Why IT sucks today Pin
Dan Neely21-Oct-15 3:03
Dan Neely21-Oct-15 3:03 
GeneralRe: Why IT sucks today Pin
den2k8821-Oct-15 3:31
professionalden2k8821-Oct-15 3:31 

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.