Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×

Comment Glass & Glow (Score 1) 194

> If China, Russia or both attacked the U.S. this way, how would we react?

I don't know, but I'm pretty sure all the janitors would be using Mop n' Glow to clean the floors, and they would have plenty of glass after. We could just rename the territories "Glass & Glow" for funsies.

Comment Re:no (Score 1) 124

> The "awkwardness" of the syntax is arguable

It really isn't. You would need to store the array allocated like in a struct along with something tracking its cardinally just to pass it around safely. Come on, buddy. You know it and I know it. Entire math libraries exist to ease the programmer with the abstraction management of it. Anyway, the issue is moot. You insulted me by telling me to "pick up a book" without asking what I meant by awkward, when the reality that extra book-keeping and arithmetic expressions are factually required: even by you for any "portable code," apparently.

You could just say, "oh I misunderstood what you meant, my culpa," you know? Rudeness was unnecessarily, added to nothing, and didn't help a single sole on earth understand anything better. It was pointless.

Comment Re:no (Score 1) 124

So if you scroll back up to my "non awkward" reference in my OP, it was referring to this, what "awkward" referred to was this:

int v3 = p3[2 * y * z + 3 * z + 4];

This is awkward. You can dynamically allocate multiple dimensional matrices in C# and dereference them unawkwardly like this:

int v3 = p3[x][y][z];

Python has a similar construct (through the numpy library), that is syntactic sugar for the same literal types of C constructs you are referring to. It just hides them and makes them "non awkward".

I've not used FORTRAN, but I'm told it's the same. Not sure.

Someone claimed on stack exchange that C99 could do better than your example, but now I have my doubts. But all you have done so far is confirm that I was right about my original statement. You could have at least asked what I meant about "awkwardness" before telling me that I was wrong. FFS.

Comment Re:no (Score 1) 124

I looked into this. I'm in the same boat as you. They updated the C standard in 99 (C99) to solve the double referencing problem of dynamically allocated arrays. So my comment describe an advantage that FORTRAN hasn't had for about 25 years. LOL. Anyway, it's good that I was wrong; it means C programs are faster now. ;-P

Comment Re:no (Score 1) 124

FORTRAN mainly beats C because the main, non-awkward way to use multi-dimensional matrices in C results in the matrix being allocated to non-contiguous memory. This is performance relevant, because this will cause the execution pipeline to stall.

Fortran fixes this. If you use the right keyword in C#, it also fixes it. The NumPy library, which uses an external C library, also fixes it, but that library is built using the "awkward" method I mentioned.

Slashdot Top Deals

The use of money is all the advantage there is to having money. -- B. Franklin

Working...